commands – job condition
Add/delete a job start condition.
Usage
job condition (add|delete) name state target [in last n unit]
where
add | add the specified condition. | |
delete | delete the specified condition. | |
name | of job whose condition to add/delete. | |
state | of target job, where state is one of the following: | |
running | target is running. | |
stopped | target is stopped. i.e not running. This is a superset of success, error, exception, missed and killed. | |
success | last execution of target was successful. | |
failed | last execution of target was error , exception , missed or killed . |
|
error | last execution of target returned an error. | |
exception | last execution of target resulted in an exception. This is likely due to an issue within BeyondCron. | |
missed | last execution of target was missed because one or more of its conditions were not met. | |
killed | last execution of target was killed. | |
target | job/s to which condition refers. target supports group wildcards, /group/*, which will match all jobs within a group. | |
n | Optional maximum age of target job state. Default is unlimited . |
|
unit | of n. Where unit is one of minute[s], hour[s], day[s] or week[s]. |
write on name
Examples
Add a condition to a job
Ensure that the weekly reboot job does not start whilst the daily backup job is running.
BeyondCron % job condition add /examples/server/reboot stopped /examples/server/backup
BeyondCron % job show $$
----------- ----------------------- Name /examples/server/reboot Description Weekly reboot ... Conditions /examples/server/backup state is stopped ...
Delete a job condition
BeyondCron % job condition delete /examples/server/reboot stopped /examples/server/backup
BeyondCron % job show full $$
----------- ----------------------- Name /examples/server/reboot Description Weekly reboot ... Conditions ...
See also
- job add
- job calendar
- job changes
- job command
- job content
- job copy
- job delay
- job delete
- job description
- job diff
- job email
- job enable/disable/bypass
- job history
- job host
- job image
- job input
- job list
- job message
- job output
- job property
- job schedule
- job show
- job sql
- job start/kill
- job status
- job subject
- job timezone
- job trigger
- job url
- job user
- job variables