Package web2py :: Package gluon :: Module newcron :: Class Token |
[hide private]
[frames] | no frames]

# Class Token

source code

    object --+
             |
            Token

Instance Methods | [hide private]
__init__(self, path) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
acquire(self, startup=True) returns the time when the lock is acquired or None if cron already running | source code
release(self) this function writes into cron.master the time when cron job was completed | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, path) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### acquire(self, startup=True) | source code
returns the time when the lock is acquired or None if cron already running lock is implemented by writing a pickle (start, stop) in cron.master start is time when cron job starts and stop is time when cron completed stop == 0 if job started but did not yet complete if a cron job started within less than 60 seconds, acquire returns None if a cron job started before 60 seconds and did not stop, a warning is issue "Stale cron.master detected"