0

Here is my crontab:

# rsnapshot jobs
0 9-21 * * *         /usr/bin/rsnapshot -c /home/kaiyin/.rsnapshot.conf hourly
52 22 * * *          /usr/bin/rsnapshot -c /home/kaiyin/.rsnapshot.conf daily
42 22 * * 6          /usr/bin/rsnapshot -c /home/kaiyin/.rsnapshot.conf weekly
32 22 1 * *          /usr/bin/rsnapshot -c /home/kaiyin/.rsnapshot.conf monthly

* * * * * /bin/echo hi >> /tmp/testlog

The last one runs ok, but the rsnapshot ones will not run, why?

2
  • 3
    Is this in /etc/crontab or in a user crontab? Does the rsnapshot command work if you copy-paste it into a shell? Have you checked the syslog for cron errors? Nov 29, 2013 at 22:19
  • Please add more details to your Q. At this point we're all stuck w/o additional information from you about your situation.
    – slm
    Nov 29, 2013 at 23:17

1 Answer 1

1

System crontabs

If these are system level crontab entries (/etc/crontab), then they're missing the username they should be running as.

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

User crontab

If on the other hand these are running as as user's crontab (crontab -e) then are they running as user kaiyin? If not then they won't work because the user whose crontab this is doesn't have read access to /home/kaiyin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .