geerlingguy / geerlingguy/ansible-for-devops
Chapter 3 - Manage cron jobs
- Dominant language
- Python
- Stars
- 9.9k
- Forks
- 3.8k
- PR merge metrics
- No merged PRs in 30d
Description
" 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the Chapter 3 cron-job example shown in the issue and confirm the Ansible cron module's default minute behavior. Update the example so it runs once at 4 a.m. by specifying minute=0, then check the rendered chapter to ensure the command and explanation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100