On 18 Feb 2022, at 01:53, Mike Wright nobody@nospam.hostisimo.com wrote:
Hi all,
There is a java app that writes directly to the pulseaudio MASTER channel at full volume twice a day. I'm pretty sure the neighbors hear it. My idea is to use crontab to run at 12:59 Monday-Friday. It waits 59 seconds, mutes the audio, waits 6 more seconds and unmutes the audio. From the command line it works. I can't make it work using crontab. It does show up in the syslog.
This is in my /etc/crontab (all on one line)
59 12 * * 1-5 root test -x /usr/local/bin/mute && \ ( \ /bin/sleep 59 ; \ /usr/local/bin/mute ; \ /bin/sleep 6 ; \ /usr/local/bin/unmute \ )
This is /usr/local/bin/mute and unmute:
sink=$(pactl info | grep "Default Sink" | cut -d' ' -f3) pactl set-sink-mute "$sink" 1 (unmute uses 0)
Anybody explain why this doesn't do what I intend?
Any output like errors will be emailed by cron. Try running /usr/bin/mail and see if you have emails with errors.
Personally I do not use cron anymore, I use system timer units. Then I can look in the journal —user for all logs from the service.
Barry
Thanks, Mike Wright _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure