[英]crontab: same script is triggered only on one day
我不是 linux 專家,需要一些對 crontab 之謎的支持(對我而言)。 我想每周兩次備份我的樹莓派。 這是同一個腳本。 但只有每周一的觸發器 (dow=1) 會執行。 星期五規則 (dow=5) 什么都不做 - 沒有保存備份。 我不明白為什么。 怎么了? 我在哪里可以找出問題所在?
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
0 4 * * 1 /home/pi/Backup/backup.sh > /dev/null
0 4 * * 5 /home/pi/Baclup/backup.sh > /dev/null
你做的一切都是正確的。 您只是錯過了第二雙眼睛,發現您在第二行中有錯字:
Baclup
與Backup
份
;-)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.