Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Handling exception logging in a Java task scheduler program?

JavaFundaSep 11 2011 — edited Sep 11 2011
I need to design a Task Scheduler Where

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

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

I found the related programme at http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml

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?

Posted at http://stackoverflow.com/questions/7377204/handling-exception-logging-in-a-java-task-scheduler-program but folks suggesting Quartz scheduler . My Limitation is that i can't for quartz because my project allows me to use only standard java library. Is there any way we can handle logging in the same programme in case of exception.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2011
Added on Sep 11 2011
2 comments
472 views