The at state can be add disposable regularly scheduled tasks for your system.
Changed in version 2017.7.0.
Remove a job from queue
Specific jobid to remove
Job's tag
Runs user-specified jobs
Addition kwargs can be provided to filter jobs. See output of at.jobcheck for more.
example1:
at.absent:
Warning
this will remove all jobs!
example2:
at.absent:
- year: 13
example3:
at.absent:
- tag: rose
example4:
at.absent:
- tag: rose
- day: 13
- hour: 16
example5:
at.absent:
- jobid: 4
The at watcher, called to invoke the watch command.
Note
This state exists to support special handling of the watch
requisite. It should not be called directly.
Parameters for this function should be set by the state being triggered.
The name of the atjob
Changed in version 2017.7.0.
Add a job to queue.
Command to run.
The 'timespec' follows the format documented in the at(1) manpage.
Make a tag for the job.
The user to run the at job .. versionadded:: 2014.1.4
If set to True job will not be added if a job with the tag exists. .. versionadded:: 2017.7.0
rose:
at.present:
- job: 'echo "I love saltstack" > love'
- timespec: '9:09 11/09/13'
- tag: love
- user: jam
New in version 2017.7.0.
Add an at job if trigger by watch
Command to run.
The 'timespec' follows the format documented in the at(1) manpage.
Make a tag for the job.
The user to run the at job .. versionadded:: 2014.1.4
If set to True job will not be added if a job with the tag exists. .. versionadded:: 2017.7.0
minion_restart:
at.watch:
- job: 'salt-call --local service.restart salt-minion'
- timespec: 'now +1 min'
- tag: minion_restart
- unique_tag: trye
- watch:
- file: /etc/salt/minion