Home | Trees | Indices | Help |
|
---|
|
A cron-like facility to regularly run some functions.
Most of the apparatus in here is not really for user consumption. There's a singleton of the queue created below, and the methods of that singleton are exposed as module-level functions.
To make the jobs actually execute, the running program has to call registerSchedulerFunction(schedulerFunction). Only the first registration is relevant. The schedulerFunction has the signature sf(delay, callable) and has to arrange for callable to be called delay seconds in the future; twisted's reactor.callLater works like this.
However, you should arrange for previous callLaters to be canceled when a new one comes in. There is no management to make sure only one queue reaper runs at any time (it doesn't hurt much if more than one run, but it's a waste of resources).
Classes | |
AbstractJob A job run in a queue. |
|
IntervalJob A job that's executed roughly every interval seconds. |
|
TimedJob A job that's run roughly daily at some wallclock (UTC) times. |
|
Queue A cron-job queue. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
tries to send a mail to the configured administrator. This relies on a functional mail infrastructure on the local host. |
schedules callable to be run every seconds. name must be a unique identifier for the "job". jobs with identical names overwrite each other. callable will be run in the main thread, so it must finish quickly or it will block the server. |
schedules callable to be run every day at times. times is a list of (day-of-month, day-of-week, hour, minute) tuples. day-of-month and/or day-of-week are 1-based and may be None (if both are non-none, day-of-week wins). name must be a unique identifier for the "job". jobs with identical names overwrite each other. callable will be run in the main thread, so it must finish quickly or it will block the server. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |