Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a radio station I listen to which plays some remixed dance music songs at a specific time each day however I am not always able to tune in everyday at those times to listen, however I quite enjoy them and want to listen to them later. There is a stream online from the station, and I'm wondering if is possible to start an audio recording at a specific time everyday for a specific length of time?

For my particular case I am referring to the following stream:

Is it possible to start recording at 5pm for an hour (so it would stop recording at 6pm) ?

I'm looking to do this from the command line on a linux based machine (on my server).

share|improve this question


Cron should be exactly, what you are looking for.

Update 2

You can use streamripper in combination with cron.

$ sudo apt-get install streamripper 

And to download a stream:

$ streamripper <url>

This will save the stream into a .mp3 file.

To stop the download of the stream, you can also use a cron-job and use the streamripper-command:

pkill streamripper
share|improve this answer
But this does not help with how I should be running it at a specific time. I'm sure I could have found out how to record from command line, but I want to record from a specific stream and at a specific time and duration. – Fogest Sep 25 '13 at 19:23
Have a look at cron. It should be exactly the right tool for you. – Christian Woerz Sep 25 '13 at 19:31
Oh wow, I completely overlooked using Cron. For me to accept your answer you will have to complete it :/. – Fogest Sep 25 '13 at 19:34
@Fogest Done. Sorry, I also completely forgot that at first. :) – Christian Woerz Sep 25 '13 at 19:37
Okay great. One last thing. How do I use this with a audio stream? I gave the stream link in the question as a sample if you need to see what I mean. – Fogest Sep 25 '13 at 19:38
up vote 1 down vote accepted

The answers I was getting was not the complete answers I was looking for, so here is the solution I used:

I found the streaming URL which used RTMP. I created a script that would be run via cronjob to start at 5pm and kill at 6pm. Here is the script I made:

rtmpdump -r "rtmp://" --playpath "CIDCFM" -o /home/jhvisser/Music/driveAt5_$(date +%y%m%d).mp3

I used the following crontabs:

00 17 * * 1-5 /home/jhvisser/bin/drive-at-five-record
00 18 * * 1-5 pkill rtmpdump
share|improve this answer

If you want to run something on a schedule, cron is the tool. However if it's a one off thing, you want "at":

at midnight <<EOF


at 1200 friday ...


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.