cron - quartz scheduler to run on specific day and time, run every hour and should continue from there -
is possible fire job
- start on specific date , time
- run every hour 1:00
- from there should continue till next 3 months for days
ex:
- start job on feb 12 2017, 1:00 am, runs every hour i.e 2:00am, 3:00am
- and continue till april 12 2017 for days
assuming current date 10 nov 2016
any solution unix cron fine
below schedule on 12th of feb, mar , april 2017. |------------------------------------------------------------------| | seconds | minutes | hours | dayofmonth | month | dayofweek | year| | | | | | | | | | 0 | 0 | */1 | 12 | 2-4 | ? | 2017| |------------------------------------------------------------------|
it can achieved using 3 cron jobs programatically.
first job:- register second cron job on day should start. triggered(run) once.
second job:- run every hour. triggered multiple times
third job:- de-register second cron job . triggered once.
explanantion:-
- when program starts, schedule first job , third job on appropriate dates respectively.
- when first job ready run, schedule second job.
- when third job ready run, remove second job.
Comments
Post a Comment