salt.modules.cron

Work with cron

Members

list_tab

salt.modules.cron.list_tab(user)

Return the contents of the specified user's crontab

CLI Example:

salt '*' cron.list_tab root

ls

salt.modules.cron.ls(user)

Return the contents of the specified user's crontab

CLI Example:

salt '*' cron.list_tab root

raw_cron

salt.modules.cron.raw_cron(user)

Return the contents of the user's crontab

CLI Example:

salt '*' cron.raw_cron root

rm

salt.modules.cron.rm(user, minute, hour, dom, month, dow, cmd)

Remove a cron job for a specified user.

CLI Example:

salt '*' cron.rm_job root \* \* \* \* 1 /usr/local/weekly

rm_env

salt.modules.cron.rm_env(user, name)

Remove cron environment variable for a specified user.

CLI Example:

salt '*' cron.rm_env root MAILTO

rm_job

salt.modules.cron.rm_job(user, minute, hour, dom, month, dow, cmd)

Remove a cron job for a specified user.

CLI Example:

salt '*' cron.rm_job root \* \* \* \* 1 /usr/local/weekly

set_env

salt.modules.cron.set_env(user, name, value=None)

Set up an environment variable in the crontab.

CLI Example:

salt '*' cron.set_env root MAILTO user@example.com

set_job

salt.modules.cron.set_job(user, minute, hour, dom, month, dow, cmd)

Sets a cron job up for a specified user.

CLI Example:

salt '*' cron.set_job root \* \* \* \* 1 /usr/local/weekly

set_special

salt.modules.cron.set_special(user, special, cmd)

Set up a special command in the crontab.

CLI Example:

salt '*' cron.set_special @hourly 'echo foobar'

Parent topic

Table Of Contents

Previous topic

salt.modules.cp

Next topic

salt.modules.data