Open cshintov opened 1 year ago
" If you want to run a shell script on all the servers every day at 4 a.m., add the cron job with: "
$ ansible multi -b -m cron -a "name='daily-cron-all-servers' \ hour=4 job='/path/to/daily-script.sh'”
But this runs the cron every minute of the hour because minute has default value *.
minute
*
To run the cron only once at 4 a.m., we need to add minute=0 to the command.
minute=0
" If you want to run a shell script on all the servers every day at 4 a.m., add the cron job with: "
But this runs the cron every minute of the hour because
minute
has default value*
.To run the cron only once at 4 a.m., we need to add
minute=0
to the command.