Using cron with Salt

The Salt Minion can initiate its own highstate using the salt-call command.

$ salt-call state.apply

This will cause the minion to check in with the master and ensure it is in the correct "state".

Use cron to initiate a highstate

If you would like the Salt Minion to regularly check in with the master you can use cron to run the salt-call command:

0 0 * * * salt-call state.apply

The above cron entry will run a highstate every day at midnight.


When executing Salt using cron, keep in mind that the default PATH for cron may not include the path for any scripts or commands used by Salt, and it may be necessary to set the PATH accordingly in the crontab:


0 0 * * * salt-call state.apply