0

i'm trying to do some stuff automatically every 8 Weeks, so i had open a new user crontab like this one:

crontab -e
0 9 * */2 1-5 do_this_stuff
# do it every 2 month on monday till friday at 9:00 am

This should do the job every 2 month on monday till friday on 9:00 am, but i does not. It is doing the job evey week once. Don't get it. What i'm doing wrong?

Running System is a latest debian.

regarding http://wiki.ubuntuusers.de/Cron it should run fine

Viktor
  • 623
  • 4
  • 10
  • 25
  • Which `cron` have you installed ? I believe this syntax is Vixie cron specific... – Basile Starynkevitch May 06 '13 at 09:19
  • how i do find it out? – Viktor May 06 '13 at 09:26
  • What does your log files say (e.g. `/var/log/syslog`, `/var/log/messages`, ...)? Did your `do_this_stuff` script do some `syslog(3)`-ing perhaps thru `logger(1)` command? Is it executable? In the standard `PATH`? Consider putting the full file path in the `crontab` entry.... – Basile Starynkevitch May 06 '13 at 09:49
  • 1
    The Anwer is, cron can't do a job randomly on a random day in a month. I had to change my crontab to: 0 9 1 */2 * do_sm_stuff -- this runns every two Month always on the first Day in a Month the cron – Viktor May 06 '13 at 09:55
  • 1
    Good to read it is solved. Maybe you can update your question or post an answer, so next people entering can know you solved it. – fedorqui May 06 '13 at 10:45

1 Answers1

0

The Anwer is, cron can't do a job randomly on a random day in a month. I had to change my crontab to: 0 9 1 */2 * do_sm_stuff -- this runs every two Month always on the first Day in a Month

thank you Igor

Viktor
  • 623
  • 4
  • 10
  • 25