#2474: Cron-like way of scheduling tasks in TGScheduler
-------------------------+--------------------------------------------------
Reporter: bochecha | Owner: faide
Type: enhancement | Status: new
Priority: normal | Milestone: __unclassified__
Component: Scheduler | Version: trunk
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Attached is a patch to add a new way of creating a task in the TGScheduler
: a cron-like task.
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
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en