[Zope] Periodic task in a Zope 2 environment

Marco Bizzarri marco.bizzarri at gmail.com
Mon Feb 16 10:59:11 EST 2009


Hi all.

A little of background, before.

I need to run some tasks, inside a zope environment, in a periodic
way. Even though I could resort to using cron and wget, I do not like
the solution too much, also because it requires me to rely on
something completly external to the application to schedule the task
itsel (I need to update the cron to change how often a job is run...
).


Now, I can see I can run a task using zopectl run + a script. My
script would therefore be something like:

while True:
     do something
     sleep(for sometime)


of course, there are dozen of ways to write this in a better way, but
that is not the problem. My problem is understanding if it is possible
to run such a script via the zdaemon. Can anyone shred some light on
this topic?

Is there a better way to run such tasks in Zope 2 environments?

Regards
Marco

-- 
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/


More information about the Zope mailing list