This new Task class takes one parameter different from other Task classes:
a string written in cron-like syntax.
This allows to schedule jobs with complex scheduling. For example, one
might want to run a job every 15 minutes on business days during the
working hours:
{{{
def hello():
print "Hello World!"
cron_str = "*/15 8-12,14-18 * * MON-FRI"
task = add_cron_like_task(hello, cron_str, taskname="hello")
}}}
If this patch is accepted, I'll also update the documentation at
http://docs.turbogears.org/TGScheduler
'''Note:''' this patch introduces a new dependency on {{{python-
dateutil}}} for TGScheduler.
--
Ticket URL: <http://trac.turbogears.org/ticket/2474>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
* owner: faide => vinces1979
--
Ticket URL: <http://trac.turbogears.org/ticket/2474#comment:1>