处理Java任务调度程序中的异常日志记录? [英] Handling exception logging in a Java task scheduler program?

查看:202
本文介绍了处理Java任务调度程序中的异常日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要设计一个任务计划程序,其中

I need to design a Task Scheduler Where

1)用户应该可以同时安排多个任务。

1) User should be able to schedule multiple task at the same time.

2)任何任务的失败
应该有适当的错误处理,不应影响其他正在运行的任务。

2) There should be proper error handling on failure of any task and should not affect the other running tasks.

我发现相关计划在 http://www.roseindia.net/java/example/ java / util / CertainAndRepeatTime.shtml

我关心的是处理在
以上链接提供的程序中的第2点。说我安排在
以上的计划中定期发送邮件,这个程序将于2011年9月12日上午2点开始运行,并且每2小时重复一次,上午8点表示一个流程fais
。我想在日志文件中记录任务名称和时间详细信息。
现在,如果我看到上面的程序,即SomeAndRepeatTime.java。该程序
将在计划所有任务后退出。应该怎样处理日志记录?

My concern is about handling of point 2 in program provided at above link. Say I schedule a recurring mail send process in above program which will be run first time on 12 september 2011 at 2 am, and will be repeated after every 2 hours Say a one process fais at 8 am. I want to log it in log file with task name and time details. Now if I look at above programme i.e CertainAndRepeatTime.java. This program will exit once it schedules all the tasks. Where and how should handle the logging?

推荐答案

你应该看看 Quartz scheduler

这篇关于处理Java任务调度程序中的异常日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆