linux - 从 crontab 运行时,Perl 中的 Carp 库在哪里打印日志

标签 linux perl shell io cron

我有一个 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/

相关文章:

perl - Perl 中的 Unicode 不工作

linux - 逐行读取文件 fork/exec - Perl

regex -\S、\W、\D 在正则表达式中代表什么?

javascript - Bash 和 mongodb 脚本评估变量

linux - 在 Linux 上从多个文件中删除冒号

perl - 为什么 "!!"在 Perl 中被认为是错误形式?

linux - 如何将 Linux 管道用于用户定义的 Shell 脚本

linux - 如何在另一个进程运行时生成一个新进程?

linux - GCC 汇编语言编译器错误

linux - 启动时的节点 webkit 窗口管理器