我有一个 Perl 脚本,它使用 Carp(鲤鱼鸣叫)来打印信息和错误。 直接运行时,我可以在控制台上看到输出。但是当我将脚本作为 cronjob 运行时,我不知道消息的去向。
已经 checkin /var/log/messages/var/log/cron 。没找到
请帮忙。
最佳答案
man cron
:
When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). Job output can also be sent to syslog by using the -s option.
关于linux - 从 crontab 运行时,Perl 中的 Carp 库在哪里打印日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30930039/