[h2title]1.check[/h2title]
service cron status
[h2title]2. open cron log[/h2title]
sudo vim /etc/rsyslog.d/50-default.conf
sudo service rsyslog restart
[h2title]3.check log[/h2title]
less -10 /var/log/cron.log
if see
No MTA installed, discarding output
need add outprint like : >> /tmp/cron_log.txt
crontab -e
add test order
* * * * * echo "Hello world!" >> /tmp/cron_log.txt
or you don’t want log
* * * * * echo "Hello world!" >/dev/null 2>&1
正文完