salt.states.at

Configuration disposable regularly scheduled tasks for at.

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

jobid: string|int
Specific jobid to remove
tag
: string
Job's tag
runas
: string
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.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.

name
The name of the atjob
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.

job
: string
Command to run.
timespec
: string
The 'timespec' follows the format documented in the at(1) manpage.
tag
: string
Make a tag for the job.
user
: string
The user to run the at job .. versionadded:: 2014.1.4
unique_tag
: boolean
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.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

job
: string
Command to run.
timespec
: string
The 'timespec' follows the format documented in the at(1) manpage.
tag
: string
Make a tag for the job.
user
: string
The user to run the at job .. versionadded:: 2014.1.4
unique_tag
: boolean
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