Hide Forgot
Description of problem: Create a crontab entry to run an send an email at 8:00 am on Monday, Tuesday and Wednesday within the first ten days of the month. The cron job was executed today, 20th of the month. Version-Release number of selected component (if applicable): Installed Packages Name : cronie Arch : x86_64 Version : 1.4.4 Release : 15.el6_7.1 Size : 174 k Repo : installed From repo : updates Summary : Cron daemon for executing programs at set times URL : https://fedorahosted.org/cronie License : MIT and BSD and ISC and GPLv2 Description : Cronie contains the standard UNIX daemon crond that runs specified programs at : scheduled times and related tools. It is a fork of the original vixie-cron and : has security and configuration enhancements like the ability to use pam and : SELinux. How reproducible: Every time. Steps to Reproduce: 1. crontab -e 2. add this entry: 0 8 1-10 * 1,2,3 /path/to/a/script.sh 3. save the crontab 4. wait for 8:00am on Mon,Tues,Wed after the 10th of the month Actual results: The script executed Expected results: The script will only execute on the specified days/dates Additional info: N/A
Citing manual page crontab(5): Note: The day of a command's execution can be specified in the follow‐ ing two fields — 'day of month', and 'day of week'. If both fields are restricted (i.e., do not contain the "*" character), the command will be run when either field matches the current time. For example, "30 4 1,15 * 5" would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.