开发者

Cron Solaris 10

开发者 https://www.devze.com 2022-12-09 21:27 出处:网络
Is there an opportunity to write STDERR message to the /var/cron/log file when a job fails to execute? Or only the return codes can开发者_JS百科 be written?I think the /var/cron/log is only used by cr

Is there an opportunity to write STDERR message to the /var/cron/log file when a job fails to execute? Or only the return codes can开发者_JS百科 be written?


I think the /var/cron/log is only used by cron itself, but you could redirect stderr into some other log file:

00 23 * * * /path/to/whatever 2>/some/log


00 11 * * * /path_to_script 1>/output_file_name 2>/error_file_name

It will write standard output to /output_file_name and standard error to /error_file_name

0

精彩评论

暂无评论...
验证码 换一张
取 消