Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 3 - Manage cron jobs #551

Open
cshintov opened this issue Jul 7, 2023 · 0 comments
Open

Chapter 3 - Manage cron jobs #551

cshintov opened this issue Jul 7, 2023 · 0 comments

Comments

@cshintov
Copy link

cshintov commented Jul 7, 2023

" 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 *.

To run the cron only once at 4 a.m., we need to add minute=0 to the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant