Ummm, may be my poor english :-(

Let me explain with an example:

I need a task to be executed multiple times, only two times (in other case
more times in periods of 48 hours), this task send a notification by email.

The times are:

start_time = 2013-08-02 12:00:00 (n_hours here are 2 hours before stop_time)
next_run_time = 2013-08-02 14:00:00
stop_time = 2013-08-02 14:00:00
period = 14400 (4 hours in seconds)

The problem is presented in the first run, here, web2py set the
next_run_time, and the fields change to:

start_time = 2013-08-02 12:00:00
next_run_time = 2013-08-02 14:00:08 <- here i need  "2013-08-02 14:00:00"
stop_time = 2013-08-02 14:00:00

At this point, the task has changed the status to expired. The question is,
how I can make the next_run_date not change, or change just the value I need
(the value of the field stop_time).

A solution could be to create multiple tasks, in this case would be two
tasks, but there are situations where I need the job to run several days in
advance in periods of 48 hours and have many tasks to a single action does
not seem very logical and orderly.

Thanks again.


2013/8/3 Niphlod <niph...@gmail.com>

> ehm.... what ? I didn't understand completely what you need and what
> you're tryning to achieve, however, if you set a period, your task needs to
> be executed multiple times...  is that the case ?
> Why do you need to set such a high period (assuming it's indeed derived
> from hours) ?
>
>
> On Saturday, August 3, 2013 7:21:23 AM UTC+2, Roberto Perdomo wrote:
>>
>> Hi,
>>
>> I have a little question:
>>
>> Exists a way to disable the period of a scheduler_task row?
>>
>> I have to do a task  in a stop_time - n_hours and stop_time, I have set
>> the period to n_hours (in seconds), but in the first run the next_run_time
>> field is set to stop_time + few seconds and this are over than stop_time,
>> this cause the status expired of my scheduler_task row.
>>
>> Thanks in advance.
>>
>>
>>  --
>
> ---
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to