doolyo
asked on
configuring crontab to run specific days of the month only (comma separated day numbers)
I would like to configure a cron task to be run only the 1st and the 15th of the month (let's say in /etc/crontab).
I have tried this specification:
09 20 1,15 * * root /root/scripts/myscript.sh
This makes it still run every day instead of the days specified with the comma separator. It probably comes from the fact that there are the days number specifiers AND the days in the week specifiers, and that the second is put to * which means each day.
This is what happens on my system: it is run every day instead of the specified 1 and 15 numbers.
Can someone help me?
I have tried this specification:
09 20 1,15 * * root /root/scripts/myscript.sh
This makes it still run every day instead of the days specified with the comma separator. It probably comes from the fact that there are the days number specifiers AND the days in the week specifiers, and that the second is put to * which means each day.
This is what happens on my system: it is run every day instead of the specified 1 and 15 numbers.
Can someone help me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This made me go further and I saw some other cron file where other days were mistakenly specified.
Most probably this will solve the problem. I will post another request in case it wouldn't be the case. I have to wait several das to know if it solved it or not.
Thank you flyjedi!
Daniel