| View previous topic :: View next topic |
| Author |
Message |
snaresV64
Joined: 09 Dec 2008 Posts: 10
|
Posted: Thu Dec 25, 2008 2:39 am Post subject: Scheduling |
|
|
I want to have a live stream scheduled to start at a specific time every sunday and monday. But the rest of the time just doing random pre-recorded audio tracks from a playlist. Now I know I can just do it manually every Sunday and Monday but I was wondering if there was a way to configure it to go automatically. From what I've read looks like I can set-up cron to run the commands needed at the right time. But I've never worked with cron.
cheers
snares |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Dec 25, 2008 2:40 pm Post subject: |
|
|
you have the right idea, cron can schedule commands to run a specific times but what commands to do will depend on what you use to control the source client. It could be a simple switch playlist and signal or it could be more involved, maybe telling some content management system.
karl. |
|
| Back to top |
|
 |
snaresV64
Joined: 09 Dec 2008 Posts: 10
|
Posted: Fri Dec 26, 2008 3:47 am Post subject: |
|
|
I suppose I will RTFM for cron and see want I can fandango. You mentioned Content Management Systems? What are some? I tried looking some up but I haven't been able to find any. Thanks again for the help karl. You've been a great help to me.
cheers
snares |
|
| Back to top |
|
 |
snaresV64
Joined: 09 Dec 2008 Posts: 10
|
Posted: Sat Dec 27, 2008 3:55 am Post subject: |
|
|
ok I read the man pages for cron. Looks pretty simple. put this in the crontab:
| Code: |
* 20 * * 0 root killall ices2 && ices2 /etc/ices2/ices-alsa.xml
* 20 * * 1 root killall ices2 && ices2 /etc/ices2/ices-replay.xml
* 21 * * 0,1 root killall ices2 && ices /etc/ices2/ices-playlist.xml
|
What I was trying to do is have the stream playing stop and then start the new stream either the live stream(ices-alsa.xml) on sunday or the re-run of it (ices-replay.xml) on Monday at 8:00pm -9:00pm. I then want the radio stream to start-up again whether it is Sunday or Monday. Hopefully it will work. . Thanks again Karl no need to reply I was only writing this for anyone else looking to try scheduling like me. |
|
| Back to top |
|
 |
Nightstar
Joined: 28 Dec 2008 Posts: 2
|
Posted: Sun Dec 28, 2008 5:50 pm Post subject: |
|
|
Intresting...
So thats how you do it in linux!
Guess will need to switch over to linux as the OS. Been running W2k and using batch files and the time scheduler of w2k. |
|
| Back to top |
|
 |
snaresV64
Joined: 09 Dec 2008 Posts: 10
|
Posted: Mon Dec 29, 2008 2:53 am Post subject: |
|
|
It seems I may have made a slight mistake when writing in my /etc/crontab file.
I had
| Code: |
* 20 * * 0 root killall ices2 && /etc/ices2/ices-playlist.xml |
but what I should have put was:
| Code: |
00 20 * * 0 root killall ices2 && /etc/ices2/-playlist.xml |
I believe with an ' * " cron keeps running the command. I haven't done any real trouble shooting so i'm not sure if it was cron or my new setup that was causing the problem.
what I had put did work but there was skipping and a high pitch squeal going on. I'll check the logs and see what was going on.
cheers
snares
**Update**
I just checked the syslog and it appears I was right. Every couple of minutes it was rerunning the command to be sure to put in the "00" for the minute to run it. |
|
| Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
|
| Back to top |
|
 |
|