okkey.........then let me check the code and report back

On Wednesday, January 8, 2014 10:14:45 PM UTC+1, Brian M wrote:
>
> I've got it scheduled to repeat every 86400 seconds (24*60*60) so once a 
> day.  I thought that it was supposed to keep the same start time like the 
> book says but it has definitely been drifting - part of the task that's 
> queued logs to a DB and I can see the timestamps there consistently 
> drifting ~20 seconds later each day.  I had another task originally setup 
> to send out a daily email at 9AM and it's drifted to going out around 
> 9:32AM over the last several months.
>
> On Wednesday, January 8, 2014 1:52:31 PM UTC-6, Niphlod wrote:
>>
>> I don't exactly get how you scheduled the tasks and how are you expecting 
>> them to run.
>> If you schedule a task to start at 10am and set a period of 24*60*60, the 
>> task will be "requeued" to be executed at 10am.
>> As the book says, 
>>
>> *The time period is not calculated between the END of the first round and 
>> the START of the next, but from the START time of the first round to the 
>> START time of the next cycle)*
>>
>>
>>
>> On Wednesday, January 8, 2014 5:10:38 PM UTC+1, Brian M wrote:
>>>
>>> Is there any way to keep the time at which recurring tasks run from 
>>> drifting? I've got several daily tasks that over time go from running at 
>>> say 10am to 10:30am - it seems like each consecutive run is 20 seconds or 
>>> so behind the previous day's. Is this simply a matter of the next execution 
>>> time being set based on the ending time of the current run rather than the 
>>> starting time?  If I want to better enforce running at a certain time daily 
>>> do I need to resort to having a maintenance task run say once a week and 
>>> reset the next run time of the daily tasks so they don't drift too far? I 
>>> suppose that this isn't too much of an issue for tasks that run on a more 
>>> regular basis like once a minute to process constantly updated queues, but 
>>> for things that you want to run at a certain set time it's a bit annoying.
>>>
>>> Thanks
>>> Brian
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to