Turn on crontab logging -- Ubuntu
crontab does not execute opening day by default. First open the log load of the scheduled task to view
Modify rsyslog service, delete the # before #cron.* in the /etc/rsyslog.d/50-default.conf file;
restart the rsyslog service:
service rsyslog restart
Restart the crontab service:
service cron restart
Check the status of crontab
service cron status
crontab -e
crontab -l
Timing format:
minute hour day month week command
such as:
0 0 * * * /bin/bash /usr/local/nginx/sbin/cut-log.sh
Modify the crontab default editor to vi or other editors
Method 1:
export EDITOR="/usr/bin/vim" ; crontab -e
Method 2:
Execute the command: select-editor
Open crontab log --Ubuntu
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326191071&siteId=291194637
Ranking