Crontab이 내 작업을 삭제하거나 이전 상태로 되돌리나요?

Crontab이 내 작업을 삭제하거나 이전 상태로 되돌리나요?

비슷한 질문을 찾았습니다 (crontab이 자체적으로 재설정됩니다.) 그러나 많은 통찰력을 제공하지는 않습니다. 저는 crontab을 처음 사용하고 있으며 매일 밤 crontab을 이전 상태로 복원하고 동일한 문제가 발생합니다(지우기는 아니지만 백업을 실행 취소하는 데 필요한 두 가지 매우 중요한 추가 사항).

네트워크 스토리지 드라이브의 루트에서 crontab을 편집하고 밤에 aws S3에 백업하는 스크립트와 모든 사람이 도착한 아침에 백업을 종료하는 추가 스크립트를 추가하고 있습니다. 나는 둘 다 crontab 상단에 놓고 저장했습니다. 백업이 예정대로 시작된 후 아침에 일어나서 백업이 종료되어야 할 때에도 여전히 실행 중임을 발견했습니다(작업이 더 이상 내 crontab에 없었기 때문입니다!).

이것이 내 crontab이 계속 재설정되는 것입니다.

root@MyCloudXYZ root # crontab -e
0 3 * * * /usr/sbin/daily_log_upload.sh &
0 3 * * * /usr/sbin/traceroute_wd.sh &
*/30 * * * * /usr/sbin/quota_monitor &
0 */4 * * * /usr/sbin/rlog -s /usr/local/modules/files/syslog_rotate.conf
01 */8 * * * [ -f /etc/init.d/atop ] && /etc/init.d/atop rotate
30 0 * * * /usr/local/sbin/ssl_cert_job.sh start > /var/log/ssl_cert_cron.out 2>&1
0 0 * * * random_chk_central -s &
30 0 * * 1 logwdmsg -e &
0 3 * * * logwdmsg -o &
01 3 * * * /usr/local/sbin/LogDataSize.sh
00 3 * * * /usr/sbin/wd_rotate.sh
30 0 * * 1 /usr/sbin/wdappmgr_log_stats.py > /dev/null 2>&1 &
30 2 * * * /usr/sbin/stime&
0 3 * * * wd_crontab.sh&
0 4 * * * auto_fw -a -c&
0 0 * * * auto_clear_recycle_bin.sh &
30 3 * * * /usr/sbin/chk_wfs_download&
0 3 * * * auto_fw -d 1&
0 0 * * * random_check -s &
0 0 * * * expire.sh
27 21 * * * /usr/local/sbin/PullWdlogConfig.sh
27 21 * * * auto_fw -d 0 &
* * * * * sysinfo_update.sh
0 3 * * 1 getHddWhiteList.sh
# Whitespace

이 되다:

35 13 * * * /usr/local/sbin/backup_pdfs.sh > /var/log/s3_sync.log
0 5 * * * /usr/local/sbin/kill_backup.sh
0 3 * * * /usr/sbin/daily_log_upload.sh &
0 3 * * * /usr/sbin/traceroute_wd.sh &
*/30 * * * * /usr/sbin/quota_monitor &
0 */4 * * * /usr/sbin/rlog -s /usr/local/modules/files/syslog_rotate.conf
01 */8 * * * [ -f /etc/init.d/atop ] && /etc/init.d/atop rotate
30 0 * * * /usr/local/sbin/ssl_cert_job.sh start > /var/log/ssl_cert_cron.out 2>&1
0 0 * * * random_chk_central -s &
30 0 * * 1 logwdmsg -e &
0 3 * * * logwdmsg -o &
01 3 * * * /usr/local/sbin/LogDataSize.sh
00 3 * * * /usr/sbin/wd_rotate.sh
30 0 * * 1 /usr/sbin/wdappmgr_log_stats.py > /dev/null 2>&1 &
30 2 * * * /usr/sbin/stime&
0 3 * * * wd_crontab.sh&
0 4 * * * auto_fw -a -c&
0 0 * * * auto_clear_recycle_bin.sh &
30 3 * * * /usr/sbin/chk_wfs_download&
0 3 * * * auto_fw -d 1&
0 0 * * * random_check -s &
0 0 * * * expire.sh
27 21 * * * /usr/local/sbin/PullWdlogConfig.sh
27 21 * * * auto_fw -d 0 &
* * * * * sysinfo_update.sh
0 3 * * 1 getHddWhiteList.sh

관련 정보