salt.states.at
Configuration disposable regularly scheduled tasks for at.
The at state can be add disposable regularly scheduled tasks for your system.
-
Changed in version 2017.7.0.
Remove a job from queue
- jobid: string|int
-
Specific jobid to remove
- tagstring
-
Job's tag
- runasstring
-
Runs user-specified jobs
- kwargs
-
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
salt.states.at.absent(name, jobid=None, **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.
- name
-
The name of the atjob
salt.states.at.mod_watch(name, **kwargs)
-
Changed in version 2017.7.0.
Add a job to queue.
- jobstring
-
Command to run.
- timespecstring
-
The 'timespec' follows the format documented in the at(1) manpage.
- tagstring
-
Make a tag for the job.
- userstring
-
The user to run the at job .. versionadded:: 2014.1.4
- unique_tagboolean
-
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
salt.states.at.present(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
- jobstring
-
Command to run.
- timespecstring
-
The 'timespec' follows the format documented in the at(1) manpage.
- tagstring
-
Make a tag for the job.
- userstring
-
The user to run the at job .. versionadded:: 2014.1.4
- unique_tagboolean
-
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
salt.states.at.watch(name, timespec, tag=None, user=None, job=None, unique_tag=False)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.at.html