2

crontab -e

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

tail /var/log/cron

Jun 13 21:01:01 web-backups run-parts(/etc/cron.hourly)[2795]: starting 0anacron
Jun 13 21:01:01 web-backups run-parts(/etc/cron.hourly)[2806]: finished 0anacron
Jun 13 22:01:01 web-backups CROND[2810]: (root) CMD (run-parts /etc/cron.hourly)
Jun 13 22:01:01 web-backups run-parts(/etc/cron.hourly)[2810]: starting 0anacron
Jun 13 22:01:01 web-backups run-parts(/etc/cron.hourly)[2819]: finished 0anacron
Jun 13 22:01:01 web-backups CROND[2822]: (root) CMD (run-parts /etc/cron.hourly)
Jun 13 22:01:01 web-backups run-parts(/etc/cron.hourly)[2822]: starting 0anacron
Jun 13 22:01:01 web-backups run-parts(/etc/cron.hourly)[2831]: finished 0anacron
Jun 13 22:44:59 web-backups crontab[2854]: (root) BEGIN EDIT (root)
Jun 13 22:45:07 web-backups crontab[2854]: (root) END EDIT (root)

But I am not seeing my cronjobs run.

I can run the tasks manually and they run fine.

2

The format you are using for your crontab is the /etc/cron.d format. When using crontab -e to edit the crontab, the username is not specified. The user used to run the job is the user that ran crontab -e.

Basically, change to this:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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