jobs add Command
jobs add command adds a job to the task handler.
jobs add [--id <id>] [--schedule <cron_expression>] [--wait-for-event <event_name>] <command>
|Job identifier (if no ID is provided, a random identifier will be automatically generated)|
|The schedule as a |
|Waits for the specified event to occur (if this option is defined in conjunction with the |
|Number of seconds for which the job is allowed to run before being automatically terminated (default 3600)|
|CLI command that will be executed when the job is triggered *||✔️||N/A|
* It is recommended to either surround the
command with single quotes (
') or escape special characters such as pipes (
|) or semicolons (
;). Multiple commands can be delimited using semicolons.
Print 'hello world' to the console every minute
> jobs add --id say-hello --schedule "* * * * *" echo hello world
Job say-hello added.
At 4am each morning, wait for message of type collect_done and print a message
> jobs add --id early_hi --schedule "0 4 * * *" --wait-for-event collect_done 'match is("volume") | format id'
Job early_hi added.
Wait for message of type collect_done and print a message
> jobs add --id wait_for_collect_done collect_done: echo hello world
Job wait_for_collect_done added.