Re: [OT] need crontab help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 18 Feb 2022, at 01:53, Mike Wright <nobody@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux