In cron, /usr/bin/paplay does not display stderr

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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.







share|improve this question






















  • Please post your crontab -l entry for this command.
    – yahol
    Mar 14 at 8:37










  • @yahol , after rebooting everything works fine, thouse sound problem still persists.
    – user58029
    Mar 25 at 1:30










  • How about enclosing that whole script in a file and adding the script to cron?
    – yahol
    Mar 25 at 4:32










  • @yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
    – user58029
    Apr 8 at 7:44














up vote
0
down vote

favorite












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.







share|improve this question






















  • Please post your crontab -l entry for this command.
    – yahol
    Mar 14 at 8:37










  • @yahol , after rebooting everything works fine, thouse sound problem still persists.
    – user58029
    Mar 25 at 1:30










  • How about enclosing that whole script in a file and adding the script to cron?
    – yahol
    Mar 25 at 4:32










  • @yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
    – user58029
    Apr 8 at 7:44












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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.







share|improve this question














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.









share|improve this question













share|improve this question




share|improve this question








edited Mar 14 at 7:41









muru

33.4k577141




33.4k577141










asked Mar 14 at 7:39









user58029

113




113











  • Please post your crontab -l entry for this command.
    – yahol
    Mar 14 at 8:37










  • @yahol , after rebooting everything works fine, thouse sound problem still persists.
    – user58029
    Mar 25 at 1:30










  • How about enclosing that whole script in a file and adding the script to cron?
    – yahol
    Mar 25 at 4:32










  • @yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
    – user58029
    Apr 8 at 7:44
















  • Please post your crontab -l entry for this command.
    – yahol
    Mar 14 at 8:37










  • @yahol , after rebooting everything works fine, thouse sound problem still persists.
    – user58029
    Mar 25 at 1:30










  • How about enclosing that whole script in a file and adding the script to cron?
    – yahol
    Mar 25 at 4:32










  • @yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
    – user58029
    Apr 8 at 7:44















Please post your crontab -l entry for this command.
– yahol
Mar 14 at 8:37




Please post your crontab -l entry for this command.
– yahol
Mar 14 at 8:37












@yahol , after rebooting everything works fine, thouse sound problem still persists.
– user58029
Mar 25 at 1:30




@yahol , after rebooting everything works fine, thouse sound problem still persists.
– user58029
Mar 25 at 1:30












How about enclosing that whole script in a file and adding the script to cron?
– yahol
Mar 25 at 4:32




How about enclosing that whole script in a file and adding the script to cron?
– yahol
Mar 25 at 4:32












@yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
– user58029
Apr 8 at 7:44




@yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
– user58029
Apr 8 at 7:44















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430117%2fin-cron-usr-bin-paplay-does-not-display-stderr%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430117%2fin-cron-usr-bin-paplay-does-not-display-stderr%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?