I’m developing an application which requires Contents of the database to be written to an ms-excel file at the end of each day. I’ve written the code for copying the contents into ms-excel file but Now how to proceed further? Whether threads are to be used to check for the completion of 24 hours or there’s some other mechanism? Please provide me some guidance.
I’m developing an application which requires Contents of the database to be written to
Share
If you need to facility to run things at set times during the day, you should consider the Quartz Scheduler. It might be overkill, but it’s very capable.
For example, you can use its
CronTriggerto configure a job to run on a schedule defined by a cron expression, e.g.0 23 55 * * ?(or something like that) would run your job at 5 to midnight every night (see examples).Quartz recently got a boost to its future and fortunes by being acquired by the Terracotta folks. Hopefully it’ll get some real active development now.