Sample Java Batch Job programs please...

imported_Tarzan

Junior Member
Sep 11, 2004
14
0
0
Hi Friends,

I have to write a Scheduled job in java which needs to run once in a day.
This program is intended to take data from one DB and update it to another DB. Any kind of guidance will be of great help.If someone can provide me some already such
written program for refrence that will also be appreciable. I am
available at "findsimrat@rediffmail.com"

Regards,
Tarzan
 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Originally posted by: Tarzan
Hi Friends,

I have to write a Scheduled job in java which needs to run once in a day.
This program is intended to take data from one DB and update it to another DB. Any kind of guidance will be of great help.If someone can provide me some already such
written program for refrence that will also be appreciable. I am
available at "findsimrat@rediffmail.com"

Regards,
Tarzan


Your best bet would be to make the program, check if it has already been run for the current time period, then run the reports and then exit. Schedule the program to run at whatever interval using cron (in *nix) or as a 'scheduled task' in windows (look inside the control panel).
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I agree. Using an external system to control the scheduling is probably easiest and cleanest. Just make damn sure your program doesn't hang, and can detect if/when the previous run messed up.