My PC's pulse audio dies whenever I open and close virtualbox windows in a certain situation.
So I tried to monitor the audio state by crontab -e.
Usually, in the commandline,
$ paplay beep.wav >>err.log 2>&1 || echo "`\`date\` `" >>err.log; is enough.
If no error, it adds nothing to err.log but beeping sound.
If an error, it adds "... shm_open() ..." and a current timestamp to err.log without beeping sound.
But if I locate this command line in cron, it makes beep sound periodically but when failed it does not log err.log. It simply doesn't make any stderr though no beep sounds. Likewise,
|| echo... doesn't work, either.