It seems that the start_time parameter in a scheduler_task record does not work correctly.
For example:
I add a record to scheduler_task which should start the function "smsEmailAussenden" (means "send the email") at 16:00
I expect the email to be sended at 16:00, but it starts immediately. At 14:45 all is done...
I use this code to add a new task. All names without a value are parameters of the function containing this statement. start_time != None
tasknr = db.scheduler_task.insert(
status='QUEUED',
application_name='secure',
task_name=task_name,
function_name='smsEmailAussenden',
args = dumps([aussendungNr]),
vars={},
enabled=True,
start_time=start_time or datetime.datetime.now(),
stop_time=stop_time or (datetime.datetime.now()+timedelta(days=1)),
repeats=1,
retry_failed=1,
period=800,
timeout=200,
)
Some months ago this code worked without problems.
What has changed inside the scheduler?
Any ideas?
Regards, Martin