Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer

Your Answer

 
discard

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.