I currently have an issue at a client site, whereby jobs that are
scheduled on a daily, weekly, monthly or yearly basis are fired twice
initially (one hour apart), but subsequent fire times (after the
second firing) are correctly calculated.
For example: User schedules a job to fire every Monday at 3pm; the
CRON string I generate and lodge in quartz would be along the lines
of: [0 0 15 ? * MON *]. The job then successfully fires at 3pm, but
the next fire time is calculated as 4pm that same Monday. (I can see
this easily on the app UI, as I expose the last and next fire times.)
When the job then fires at 4pm, the next fire time is calculated -
correctly - one week in the future, the following Monday at 4pm.
If I schedule per minute or per hour jobs, they execute at the correct
frequency, but once I am at daily or less frequent schedules I get the
behaviour above.
The client is on Australian Eastern Standard Time, I am in New
Zealand, and cannot reproduce the problem locally and have the feeling
it's perhaps time zone related. I have tried scheduling jobs on my
machine set up as AUS Eastern Standard Time, but next fire time is
calculated correctly from the off.
Any ideas?
Many thanks,
James
An update on this behaviour; using a daily test job, on the third
firing, the next fire time seems to have been calculated based in the
originally scheduled time.
In summary:
Job initially scheduled on 2 MAR @ 7.39 to run daily (CRON = [31 39 7
* * ? *])
Fired on 2 MAR @ 7.39 -> Next fire time 2 MAR @ 8.39
Fired on 2 MAR @ 8.39 -> Next fire time 3 MAR @ 8.39
Fired on 3 MAR @ 8.39 -> Next fire time 4 MAR @ 7.39
The job and associated details are unchanged from their intial
scheduling. As far as I understand, there is no way the quartz service
can change the CRON string (only ever the next fire time, based on
reading the CRON string).
Any help or advice would be greatly appreciated.
Thanks,
James