Alpine Linux Log crontab Command Output
Unlike cronie the crontab daemon, the Alpine Linux crond
crontab daemon won’t log output of commands in crontab. One way to get around this is to do instead
* * * * * sh -c "cmd 2>&1 | sed -e 's/^/CMDOUT (/' -e 's/$/)/' | logger -t CROND[$(cat /run/crond.pid)]"
so that the output or error message will be displayed as
<time> ... CROND[<pid>] CMDOUT (...)
in the syslog message /var/log/messages
.