我配置了一个常规任务
me@alpha:~$ crontab -l | grep '^\*'
*/5 * * * * (cd ~/Documents/OrgMode; git add .; git commit -m "defensively save")
它有效,但我找不到登录 mail.log
me@alpha:~$ grep 'git' /var/log/mail.log
me@alpha:~$ grep 'git' /var/log/mail.log
我在哪里可以找到日志?
要查看有关 cron 服务的日志条目,请在 ubuntu 18.04+ 上执行此命令:
journalctl -u cron.service
在 Ubuntu 16.04 中看到这个问题:16.04: How do I make cron create cron.log 并实时监控它?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句