[TurboGears] #2474: Cron-like way of scheduling tasks in TGScheduler

8 views
Skip to first unread message

TurboGears

unread,
Mar 8, 2010, 9:36:33 AM3/8/10
to turbogear...@googlegroups.com
#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

TurboGears

unread,
Mar 10, 2010, 9:59:58 AM3/10/10
to turbogear...@googlegroups.com
#2474: Cron-like way of scheduling tasks in TGScheduler
-------------------------+--------------------------------------------------
Reporter: bochecha | Owner: vinces1979
Type: enhancement | Status: new
Priority: normal | Milestone: __unclassified__
Component: Scheduler | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by Chris Arndt):

* owner: faide => vinces1979

--
Ticket URL: <http://trac.turbogears.org/ticket/2474#comment:1>

Reply all
Reply to author
Forward
0 new messages