I don't have
MTA installed on my desktop.
Whenever there is a problem with a
cronjob script, I see this in my logs:
CRON: (CRON) info (No MTA installed, discarding output)
A script that was supposed to be run by
cron generated an error, and
cron wanted to send me the error per email.
But I would like to see the error in my log instead, ie being logged normally to
syslog, same as the above
Is it possible to tell
cron to forget about
MTA, and log everything, including errors, to local
the solution from @roaima works well for my original problem as stated.
But I have realized I need more sophisticated syntax for my
command1 is piped to
stderr (from both?) is piped to
Here is a concrete example (simplified):
0 * * * * mysqldump mydb | ifne xz > "/tmp/$(date +\%F).sql.xz" | logger -t mysqldump -p cron.err
In the abova example, I need to send stdout from
ifne xz and only if either
ifne xz generate error do I need to pipe it to logger.
This syntax needs to works in