The at state can be add disposable regularly scheduled tasks for your system.
salt.states.at.
absent
(name, jobid=None, **kwargs)¶Changed in version 2017.7.0.
Remove a job from queue
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
salt.states.at.
mod_watch
(name, **kwargs)¶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.
salt.states.at.
present
(name, timespec, tag=None, user=None, job=None, unique_tag=False)¶Changed in version 2017.7.0.
Add a job to queue.
rose:
at.present:
- job: 'echo "I love saltstack" > love'
- timespec: '9:09 11/09/13'
- tag: love
- user: jam
salt.states.at.
watch
(name, timespec, tag=None, user=None, job=None, unique_tag=False)¶New in version 2017.7.0.
Add an at job if trigger by watch
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