Niphlod, I really appreciate your time on this. 

I left the task queued and I went to sleep. The same only task that the 
previous example (I only changed the period to 300 seconds instead of 30, 
and left repeats=0 to make it loop). The worker is starting every 2 minutes 
(from linux cron). 

This morning, when I check the scheduler_run table, I see that the task was 
successfully executed, but only some times, not every 5 minutes (300 
seconds), but every some random period, much larger than 5 minutes. This is 
the start/stop time of the runs in the scheduler_run table:
 2015-05-13 00:57:08
 2015-05-13 03:21:07
 2015-05-13 03:54:08
 2015-05-13 04:03:07
 2015-05-13 04:39:08
 2015-05-13 06:09:07
 2015-05-13 06:33:08
 2015-05-13 06:36:07
 2015-05-13 06:45:08
 2015-05-13 07:33:08
 2015-05-13 07:57:07
 2015-05-13 08:33:07

Notice that the last run was about 20 minutes ago. The task ran succesfully 
at 8.33, and the scheduler set next_run_time to 8.36.
Now it's 9.00 and the task haven't executed yet. Though, I checked the 
scheduler_worker table, and I can see the last heartbeat was at 9.00. 
Also notice that some runs occur with very little time difference, and 
others don't.

If I start the worker manually with -D 0 option, I see the same log posted 
in the previous post.
It would seem as if the scheduler wasn't seeing the task. But every once in 
a while, it picks up the task.

I don't have any other task scheduled, nor any other workers starting. 
Also, I don't have any other cron task scheduled on the server that could 
be interfering. 

I checked the connection to the database, and it's ok, I'm connecting to 
the correct db. Actually it's the only db on my server that has the 
scheduler tables (I've manually logged in to the other dbs to check the 
scheduler tables weren't being created there).

I would like to try to remove completely the scheduler tables and let 
web2py re-create them. I don't know, just a try. 
I'm not shure how to do it. I think I would manually drop the tables from 
the database, and then manually remove the corresponding files under 
databases/ folder. Is this the correct approach? I can't think of another 
test to do here, I'm really in a dead end :/



El miércoles, 13 de mayo de 2015, 5:31:28 (UTC-3), Niphlod escribió:
>
> the scheduler doesn't depend on nginx, uwsgi and such. 
> it's an external process that communicates with the app with the database 
> as the only mean of communication. 
> If you queue something and you verify that is in the scheduler_task table, 
> and the scheduler doesn't see it, it's because it's pointing to a different 
> database.
>
>

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

Reply via email to