小编Mas*_*ton的帖子

Logging ALL stderr output of crontab to file

For example, I can log stderr of one script in this way:

* * * * * run_script.sh > /var/log.txt 2>&1
Run Code Online (Sandbox Code Playgroud)

But I want to log stderr of all scripts in my crontab. I can append > /var/log.txt 2>&1 to all scripts, but it's not good if I have hundreds of scripts in cron. Is there another, more simple way to do this?

cron logs io-redirection

13
推荐指数
2
解决办法
2万
查看次数

标签 统计

cron ×1

io-redirection ×1

logs ×1