Bases: exceptions.Exception
Bases: object
Tasks to be run at a periodic interval.
Decorator to indicate that a method is a periodic task.
This decorator can be used in two ways:
- Without arguments '@periodic_task‘, this will be run on every cycle of the periodic scheduler.
- With arguments: @periodic_task(spacing=N [, run_immediately=[True|False]]) this will be run on approximately every N seconds. If this number is negative the periodic task will be disabled. If the run_immediately argument is provided and has a value of ‘True’, the first run of the task will be shortly after task scheduler starts. If run_immediately is omitted or set to ‘False’, the first time the task runs will be approximately N seconds after the task scheduler starts.