开发者

echo o/p from crontab

开发者 https://www.devze.com 2023-03-10 08:45 出处:网络
If my crontab had the entry 开发者_StackOverflow中文版# m hdom mon dowcommand 12 16 5 6 7 echo \"echo from cron\"

If my crontab had the entry

开发者_StackOverflow中文版# m h  dom mon dow   command
12 16 5 6 7 echo "echo from cron"

where would the output of echo go ?

I don't see it on my shell's stout.


It gets sent to the local mailbox of the user the script runs under.


cron emails the output of the command to you.


You can explicitly redirect the output to a file, if you don't want to rely on mail


If you want me to give you the fish:

$MAILTO is who gets mailed the output of each command. But, i usually redirect the out and err to files.

If you want me to teach you fishing: Go to the cron man page and search for output

0

精彩评论

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