The interval unit setting in scheduler

Asked by zaki1029

Hi Buddies,

I'm trying to use the scheduler/Scheduled Actions to run some batch jobs behind. While setting the job property like the following:

Interval Number=1
Interval Unit=Minute

The job will run once after I click save. But the problem is that the" next execution date" will increase by one day regardless of what we have set for the interval unit. It is supposed to increase by only 1 minute.
Has any one come across the similar scenario when implementing the scheduler?

Regards

Sage

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Ferdinand
Solved:
Last query:
Last reply:
Revision history for this message
Niels Huylebroeck (red15) said :
#1

Which version are you running ?

2012/12/10 zaki1029 <email address hidden>

> New question #216413 on OpenERP Addons:
> https://answers.launchpad.net/openobject-addons/+question/216413
>
> Hi Buddies,
>
> I'm trying to use the scheduler/Scheduled Actions to run some batch jobs
> behind. While setting the job property like the following:
>
> Interval Number=1
> Interval Unit=Minute
>
> The job will run once after I click save. But the problem is that the"
> next execution date" will increase by one day regardless of what we have
> set for the interval unit. It is supposed to increase by only 1 minute.
> Has any one come across the similar scenario when implementing the
> scheduler?
>
> Regards
>
> Sage
>
> --
> You received this question notification because you are a member of
> OpenERP Committers, which is an answer contact for OpenERP Addons.
>

--
Niels Huylebroeck
Bubbles-IT
Tel. : +32 (0)9 328 33 88
Web : http://www.bubbles-it.be

Revision history for this message
zaki1029 (zaki1029) said :
#2

This happen to both v6 and v7

Revision history for this message
Ferdinand (office-chricar) said :
#3

Hello
we have been rewriting the "cron" because especially long running jobs created massive problems.

the module will show up soon in

https://code.launchpad.net/~c2c/c2c-rd-addons/6.1/timed_job
https://code.launchpad.net/~c2c/c2c-rd-addons/7.0/timed_job

and will be moved than to a community repository

Revision history for this message
Niels Huylebroeck (red15) said :
#4

I think perhaps Ferdinand is trying to say that maybe your cron task itself runs longer than the scheduled interval ?

In such cases the cron pauses the other cron tasks until the current tasks cron was doing are done. I mean that it will not even check for cron tasks to run while an active cron is still running.

Revision history for this message
zaki1029 (zaki1029) said :
#5

Hi Ferdinand,

Thanks a lot for keeping me updated with the news.

@Niels,

What I put in the cron task is just a simple "select" query, i have debug the code and it will take less than 0.1 sec to go through.
So I suspect there might be something wrong with the cron module that make the interval to be 1 day instead of 1 min.

Revision history for this message
Best Ferdinand (office-chricar) said :
#6
Revision history for this message
zaki1029 (zaki1029) said :
#7

Thanks Ferdinand @ Camptocamp, that solved my question.