# Change radio by command / crontab

**URL:** <https://discourse.mopidy.com/t/change-radio-by-command-crontab/912>\
**Category:** Pi MusicBox (archive)\
**Created:** [September 28, 2015, 11:23am UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912 "2015-09-28T11:23:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcmk](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marcmk](https://discourse.mopidy.com/u/Marcmk)\
**Post date:** [September 28, 2015, 11:23am UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/1 "2015-09-28T11:23:16Z")

</div>

Hi there,

Is it possible to change the radio station by command (http Stream)?  
So i can make an crontab to change te radio channel by time.

It will also function when the internet connection is dropped overnight.

Kind regards,  
Marc

---

<div class="post-metadata">

**Author:** ![Geert](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/geert/32/252_2.png) [@Geert](https://discourse.mopidy.com/u/Geert)\
**Post date:** [September 28, 2015, 1:19pm UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/2 "2015-09-28T13:19:22Z")

</div>

If you install MPC ([http://manpages.ubuntu.com/manpages/lucid/man1/mpc.1.html](http://manpages.ubuntu.com/manpages/lucid/man1/mpc.1.html)), an MPD command line client, you can write scripts to automate Mopidy. I use it to automatically start a radio stream after booting, and put Mopidy in Consume mode.

---

<div class="post-metadata">

**Author:** ![Marcmk](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Marcmk](https://discourse.mopidy.com/u/Marcmk)\
**Post date:** [September 28, 2015, 1:36pm UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/3 "2015-09-28T13:36:09Z")

</div>

I’m using Pi MusicBox.  
Would be nice for the command to change playing radio channel.

---

<div class="post-metadata">

**Author:** ![Geert](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/geert/32/252_2.png) [@Geert](https://discourse.mopidy.com/u/Geert)\
**Post date:** [September 28, 2015, 1:39pm UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/4 "2015-09-28T13:39:22Z")

</div>

Put the radio channel in a play list and use MPC to select or switch playlists, that’s how I start my radio stream at boot time.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [September 28, 2015, 3:33pm UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/5 "2015-09-28T15:33:18Z")

</div>

mpc is already installed in musicbox so just do as @Geert has kindly suggested:

```auto
mpc clear
mpc add <http://some_radio_stream>
mpc play

```

Or stick them all in a big playlist file, load it, and just do `mpc next` every hour, or whatever, depends exactly what you want.

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 19, 2026, 11:47am UTC](https://discourse.mopidy.com/t/change-radio-by-command-crontab/912/6 "2026-02-19T11:47:38Z")

</div>


