Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added two lines to my crontab:

0,4,1,* * * * * /srv/

30,4,1,* * * * * /srv/

Both sh should be executed one time at the first day of a month. Would they work?

share|improve this question
Numbers separated by commas will stay in the same column. So your first line says to run the command at 0 minutes, 4 minutes, 1 minutes, and every minute; every hour; every day (of the month); every month; every day (of the week). – Chris S Apr 6 '10 at 21:56
up vote 2 down vote accepted

I don't think they will work properly. You need to replace the asterisks with your numbers, and don't separate them with commas.

This will run at 4am on the first of each month:

0 4 1 * * /srv/

This will run at 4:30am on the first of each month:

30 4 1 * * /srv/

Good luck,


share|improve this answer

No - you've got too many asterisks and commas there.

For executing once on the first day of the month, you want something like

0 8 1 * * /srv/

That will run at 8AM on the 1st of each month.

share|improve this answer

Add this comment line on your crontab :

# m h dom mon dow user  command

(or without user if you are not on a Debian/Ubuntu plateform). Then you will see that you don't have the good number of parameters.

Of course, check your logs. With your line, I have :

Error: bad command; while reading /etc/crontab
share|improve this answer
This works for the crontab in /etc, for a user's contrab, leave out the 'user' column. – Chris S Apr 6 '10 at 21:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.