1

I am running Debian sid.

I'm trying to get audacious to start up and play an online radio station at 9 AM on Mon, Tue, Wed, & Thu every week. I have the station URL saved in a pls file which I downloaded from the station website itself, and I have confirmed that audacious plays it. But I can't get cron to start it. In my crontab I've tried:

0 9 * * 1-4 audacious /home/ryan/Music/WSMR_Radio.pls

and

0 9 * * 1-4 'audacious /home/ryan/Music/WSMR_Radio.pls'

and

0 9 * * 1-4 "audacious /home/ryan/Music/WSMR_Radio.pls"

with no luck. What am I doing wrong? I'm not finding my mistake in info crontab(5).

I suppose some might respond, "Don't use cron, use [this other tool]," but I'd still like to know how to use cron correctly, for future reference at the very least.

1
  • I tried with full path to audacious, un/single/double-quoted, nothing worked (testing with a crontab line of every 2 minutes). So I tried mpv /home/ryan/Music/WSMR_Radio.pls which worked fine. Running audacious from the command line I saw it was giving me errors about not finding some other files in other open audacious tabs. So I closed those other audacious tabs and tried again, still no go. Since probably something's up with my audacious, and probably the crontab syntax is okay, should I answer my own question and mark as solved?
    – RML
    Sep 14, 2016 at 3:31

3 Answers 3

0

Use cron, use audacious but with other tool called:

audtool --playback-play

Audacious hasn't got autoplay feature after adding playlist as i know. So leave audacious running whole night, then cron will push the play button with audtool.

1
  • audacious /home/ryan/Music/WSMR_Radio.pls opens audacious and immediately starts playing. but thank you for the mention of audtool; I did not know about that.
    – RML
    Sep 14, 2016 at 3:14
0

I tried crontab entries with and without the full path to audacious, tried both of them un-, single-, and double-quoted, and nothing worked. I made sure audacious gave me no errors when run manually from the command line. Then I tried the crontab line with 'mpv' instead of 'audacious', without its full path, and unquoted, and it worked. Probably the crontab line was fine, and there is some other problem happening, perhaps with audacious. I will accept this as the answer

0

I too had to use mpv for a while, but then found a working solution for starting from . First check your display variable:

env | grep DISPLAY

In your case (and assuming that DISPLAY=:0.0) the entry would be as follows:

0 9 * * 1-4 env DISPLAY=:0.0 audacious '/home/ryan/Music/WSMR_Radio.pls'

Source: https://linuxtidbits.wordpress.com/2008/01/19/cron-alarm-clock/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .