Background Task
Run a periodic task in the background. Note that this module still must be included as a module in a tab of a handler, and it will display a toggle switch for whether the task is active or not (often suitable for a settings tab/page).
Outline Display: The task is called {{taskName}} and will run every {{period}} seconds. The data will come from {{query}}. For every row of data, we will perform the following: {{rowAction}}
Details
The execution model is: the SQL query runs on a periodic schedule, and for each row it returns, the rowAction sequence is executed. The concept renders a toggle switch in the UI to enable or disable the task. The module must be placed as a module in a tab or page to be rendered and controllable.
Local scope
Names introduced within this component’s knobs:
schema– result columns ofquery(referenceable as a virtual table)
Settings
Required
-
taskName: constant value (type: text; required, non-nullable)
The name of the task, for showing to a user -
query: SQL query
A SQL query that produces rows upon which to actScope: none – this query does not accept [Username] or handler parameters. Use only table/column references and literal values.
-
period: constant value (type: integer; required, non-nullable)
The task’s period (in seconds)
Optional
rowAction: ingredient slot ofrowActionsIngredients(schema)(many)
The action(s) to be performed on each row