Bases: exceptions.Exception
Bases: object
Add a periodic task to the list of periodic tasks.
The task should already be decorated by @periodic_task.
Tasks to be run at a periodic interval.
Entry point for oslo-config-generator.
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 the default interval of 60 seconds.
- With arguments: @periodic_task(spacing=N [, run_immediately=[True|False]] [, name=[None|”string”]) 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. If name is not provided, __name__ of function is used.