← Back to team overview

magentoerpconnect-community team mailing list archive

Re: openERP scheduler problems

 

Hello,

I confirm weird behavior of scheduler as similar issues have been reported
by users of poweremail also who had schedulers with high frequency.

+1 for a redesign

Thanks

Sharoon Thomas,
Business Analyst & ERP Consultant,
--Sent from Google android

On 21 Oct 2010 22:14, "Erik Dannenberg" <e.dannenberg@xxxxxxxxxxxxxxxxxx>
wrote:

Hello,

just a little heads up on the openerp scheduler. It seems the scheduler in
v5 (no idea if its the same in v6 but i would guess so) has some serious
design flaws.

Scenario:

Lets say we have 2 jobs that are running every 5 minutes. Each of those jobs
takes 3 minutes to run.
So the scheduler will grab the jobs it needs to execute and call them one by
one. After each job run it sets the time for the next call on each called
job. The problem is that the whole run took 6 minutes while the dates for
the next call are based on the previous call date. What now happens is that
the time for the next call is already in the past and hence the scheduler
simply won't call the jobs anymore.

Now there is that checkbox 'repeat missed' which i think is what is supposed
to fix that. Let's see what happens:

So the jobs run for the first time, the next call date is set in the past
and hence no more job execution. Until you restart the server, on restart
openerp will execute the 2 jobs for each intervall it missed repeatly, and
then happily sets a next call time in the past. So after that the jobs will
still cease to keep running.

Conclusion:

If you set up a couple of frequent jobs you have to take into account the
whole runtime for all jobs, the call intervall for each job needs to be
longer then the total runtime of all jobs. Else you will run into problems.

Personally i think at its current form the scheduler is not usable for
frequent job calls and needs a redesign. A quick fix might be to set the
next call time based on the runtime of the job, ie at the end of the job run
set next_call to now()+call_intervall. Ofcourse this will not work if you
want jobs to execute at a fixed time, but should be ok if all you need is
short intervalls.

regards,
Erik Dannenberg
bloopark systems





_______________________________________________
Mailing list: https://launchpad.net/~magentoerpconnect-community
Post to     : magentoerpconnect-community@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~magentoerpconnect-community
More help   : https://help.launchpad.net/ListHelp

Follow ups

References