We help IT Professionals succeed at work.
Get Started

configuring crontab to run specific days of the month only (comma separated day numbers)

doolyo
doolyo asked
on
696 Views
Last Modified: 2010-08-05
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?
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE