Task is a piece of code periodically executing by the system and doing something which does not require user interaction - clearing space, activating objects, importing data etc.
Task is configured by DB setting. The setting defines delays between executions and other parameters specific per task.
- Delay between task executions in minutes. Set to 0 to disable the task.
- Valid values [digits][suffix] where suffix: s seconds, m minutes, h hours, d days.
Every task is executed by the system every 10 seconds and sleep parameter is used internally by a task with its last executed time to test if the task should run now or stay idle. If admin changes sleep then the new value will be picked up on the next loop.
Some tasks require a green light to execute. Such a task will try to acquire a lock by checking state of other tasks or database flags. If the lock cannot be acquired due to some of the conditions not met, the task will try again on the next loop. Otherwise, the task will set the flag in the database (lock) which other tasks may query and postpone their execution until the lock is released. Tasks may also persist their state as the database flags for other tasks to query - this allows creation of chains for running tasks in ordered sequence.