cron doesn't seem to work on 2.3.2 running as a Windows 7 service. Not sure
how to find the problem.
--
OK, I'll try try it with my own UUID rather.
I don't need my task to run at exactly 5 second intervals, it's a simple
task which updates only a few parameters but it needs to happen quite
regularly. I think the scheduler works well enough for my purposes here, I
don't expect it to be precise.
queue_task does a validate_or_insert, because its meant to be used to queue
the tasks
if you want to use that you should enforce your own fixed uuid and pass
that to queue_task()... validation will fail (because the uuid is declared
as unique, and another row with that id sits on the table
Hi again,
Thanks for the tips! What I ended up doing is creating a model file
containing the following:
import datetime
if db(db.scheduler_task).isempty():
db.scheduler_task.update_or_insert(db.scheduler_task.task_name=='my_function',
application_name='my_app',
its more of an architectural problem than a web2py one to be sure that
the tasks are there you may have to check for their presence on the
scheduler_task table. There is the uuid column that is enforced as unique,
so you can use it to query the table safely.
Now, the problem is that you gen
Hi Niphlod. Thanks so much for the reply. I suspected I had the*
queue_task*method in the wrong place and I did.
Is there isn't any neat way of automatically checking that these tasks are
in the database and adding them if they're not there? I don't really want
to have to access a controller to
scheduler support coming .
I think you didn't understand how models works / the scheduler works. Sorry
for probably being redundant/naive, but just to check.
in models belong:
def myfunction():
whatever
from gluon.scheduler import Scheduler
myscheduler = Scheduler(db)
Th
7 matches
Mail list logo