Package gavo :: Package base :: Module cron :: Class AbstractJob
[frames] | no frames]

Class AbstractJob

source code

object --+
         |
        AbstractJob
Known Subclasses:

A job run in a queue.

These have a name and a run() method; use their reportCronFailure(message) method to deliver error messages (of course, you can also just log; reportCronFailure will in typically send a mail). Concrete jobs have to implement a getNextWakeupTime(gmtime) -> gmtime method; they probably have to redefine __init__; the must up-call.

Instance Methods
 
__init__(self, name, callable)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
reportCronFailure(self, message) source code
 
run(self)
runs callable under somewhat reliable circumstances.
source code
 
getNextWakeupTime(self, curTime)
returns the UTC unix epoch seconds when this job is next supposed to run, starting from curTime.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  lastStarted = None
hash(x)
Properties

Inherited from object: __class__

Method Details

__init__(self, name, callable)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)