这是我的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最后一个运行正常,但r快照不能运行,为什么?
发布于 2013-11-29 22:51:52
如果这些是系统级crontab条目(/etc/crontab),那么它们就缺少了应该运行的用户名。
# 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另一方面,如果它们以用户的crontab (crontab -e)的形式运行,那么它们是否以用户kaiyin的身份运行?如果没有,它们将无法工作,因为它的crontab的用户没有读取/home/kaiyin的权限。
https://unix.stackexchange.com/questions/103138
复制相似问题