Lost recurrent jobs while daylight saving

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lost recurrent jobs while daylight saving

Michael Imhof
While daylight saving time (from 3am to 2am Hour on Oktober 26th) we lost 2 recurrent jobs.
Job 1 should start every 15 Minutes and had last runtime on 2:13am.
Job 2 should start every 6 Hours and had last runtime on 2:18am.

The problem happens in the method PersistedServiceJob.createRecurrence. The check
(next > runtime) returns false.

    private void createRecurrence(GenericValue job, long next) throws GenericEntityException {
        if (Debug.verboseOn()) Debug.logVerbose("Next runtime returned: " + next, module);

        if (next > runtime) {
            String pJobId = job.getString("parentJobId");
            if (pJobId == null) {
                pJobId = job.getString("jobId");
            }
            GenericValue newJob = GenericValue.create(job);
...


We're using an older version of ofbiz (March 06) and I saw that there had been a lot of work on the
RecurrenceRule (use of Temporal expressions) in the meantime.

But I couldn't find a hint about daylight savings..

Does somebody had the same problem? And fixed it?

Regards,
Michael
Reply | Threaded
Open this post in threaded view
|

Re: Lost recurrent jobs while daylight saving

Adrian Crum-2
You could try copying the temporal expressions and the job scheduler from a newer version, then set up your jobs to run on temporal expressions.

-Adrian


--- On Fri, 11/7/08, Michael Imhof <[hidden email]> wrote:

> From: Michael Imhof <[hidden email]>
> Subject: Lost recurrent jobs while daylight saving
> To: [hidden email]
> Date: Friday, November 7, 2008, 5:25 AM
> While daylight saving time (from 3am to 2am Hour on Oktober
> 26th) we lost 2
> recurrent jobs.
> Job 1 should start every 15 Minutes and had last runtime on
> 2:13am.
> Job 2 should start every 6 Hours and had last runtime on
> 2:18am.
>
> The problem happens in the method
> PersistedServiceJob.createRecurrence. The
> check
> (next > runtime) returns false.
>
>     private void createRecurrence(GenericValue job, long
> next) throws
> GenericEntityException {
>         if (Debug.verboseOn()) Debug.logVerbose("Next
> runtime returned: " +
> next, module);
>
>         if (next > runtime) {
>             String pJobId =
> job.getString("parentJobId");
>             if (pJobId == null) {
>                 pJobId = job.getString("jobId");
>             }
>             GenericValue newJob = GenericValue.create(job);
> ...
>
>
> We're using an older version of ofbiz (March 06) and I
> saw that there had
> been a lot of work on the
> RecurrenceRule (use of Temporal expressions) in the
> meantime.
>
> But I couldn't find a hint about daylight savings..
>
> Does somebody had the same problem? And fixed it?
>
> Regards,
> Michael
>
> --
> View this message in context:
> http://www.nabble.com/Lost-recurrent-jobs-while-daylight-saving-tp20380477p20380477.html
> Sent from the OFBiz - Dev mailing list archive at
> Nabble.com.