Task Scheduling¶
Scheduling functions for tasks. They can be imported from fluid.scheduler:
fluid.scheduler.Scheduler
¶
fluid.scheduler.every
¶
Bases: Scheduler
Run a task every delta time, with optional delay and jitter
| PARAMETER | DESCRIPTION |
|---|---|
delta
|
The time delta between runs
TYPE:
|
delay
|
The initial delay before the first run
TYPE:
|
jitter
|
The maximum random jitter added to the delta
TYPE:
|
Source code in fluid/scheduler/scheduler_every.py
info
¶
fluid.scheduler.crontab
¶
Bases: Scheduler
Convert a "crontab"-style set of parameters into a test function that will return True when the given datetime matches the parameters set forth in the crontab. For day-of-week, 0=Sunday and 6=Saturday. Acceptable inputs: * = every distinct value /n = run every "n" times, i.e. hours='/4' == 0, 4, 8, 12, 16, 20 m-n = run every time m..n m,n = run on m and n