0

I'm new to crontab and I thought I understood how it works, but apparently not. What am I doing wrong ?

I have added a few line in cron using :

    crontab -e

I believe the following line should do this :

  1. run every 1/4 houres rsnapshot hourly
  2. run at 3:30 every day rsnapshot daily
  3. run at 3:00 once in a week (monday) rsnapshot weekly
  4. run at 2:30 once in a month (the 1st of each month) rsnapshot monthly

    0 */15  * * *           /usr/bin/rsnapshot hourly
    30 3    * * *           /usr/bin/rsnapshot daily
    0  3    * * 1           /usr/bin/rsnapshot weekly
    30 2    1 * *           /usr/bin/rsnapshot monthly
    

I have been waiting about 2 houres now, and rsnapshot hourly didn't happened.

Can someone explain me what I missed ?

  • I marked this as duplicate as there are quite a lot of "My cronjob is not running"-related questions, the linked one being merely an example. I suggest you also take a look at [the info page](https://stackoverflow.com/tags/cron/info) of the `cron`-tag, it provides some info on how to best debug these kinds of issues. – Oliver Baumann Oct 24 '18 at 12:21

1 Answers1

0

The crontab looks ok, however there a number of reason that it may not have run.

You should check the following:

  • check the system log to see if it attempted to run and failed;

  • verify your user has permissions to run /usr/bin/rsnapshot;

  • verify that your system doesn't have a cron.allow file, or if it does, you are in it;

  • verify your system doesn't have a cron.deny file with you in it;

  • verify cron is actually running.

lostbard
  • 5,065
  • 1
  • 15
  • 17
  • 1
    I have just edited */15 to 15 and it seems to be working ! It's not doing exactly what I excepted him to do, but it will do for now. I'll look for a real fix as soon as possible. –  Oct 24 '18 at 12:13