record streaming audio using Audacity and crontab

How can I record streaming audio using Audacity and then use crontab to schedule the recording.

I am using Audacity 2.0.1 and antix mx-14 which is a Debian based distro.

Please read the Manual: Audacity Manual .

Audacity has a scheduled recording feature if you are prepared to start the Audacity GUI manually:
Audacity Manual .

If not, you could try these search results for Cron documentation .


Thanks. Basically I have several radio shows I need to record on a particular day and at particular times so I thought that putting this in a crontab would be great because I could easily see in a list all the shows that need to be recorded and then make necessary adjustments if need be.

This is what I have at the moment using arecord I am able to record directly from a radio attached to my computer. Trouble is the reception wavers some times so I need to find alternate ways to record my shows.

#radio shows
50 9 * * 7 /usr/bin/arecord -t wav -f cd -d 6680 /home/randy/Music/BS$(date "+%^b%d%y").wav
50 10 * * 7 /usr/bin/arecord -t wav -f cd -d 6880 /home/randy/Music/IHTSB$(date "+%^b%d%y").wav
50 11 * * 7 /usr/bin/arecord -t wav -f cd -d 8860 /home/randy/Music/IT$(date "+%^b%d%y").wav
00 17 * * 6 /usr/bin/arecord -t wav -f cd -d 100 /home/randy/Music/6pmtest$(date "+%^b%d%y").wav

So if I can do something similar using code to capture live radio streams, that would be great!

Thanks again!!

If the radio reception wavers, the recording will waver, whatever recording method you use. Or do you mean these shows are also available online?

Audacity doesn’t have any command-line arguments that instruct it to record, only to open or open with files. So you would have to open Audacity then use autokey or IronAHK or similar to issue keyboard commands, or compile Audacity and control it over a named pipe using Scripting .

It would make more sense to me to use a command-line app like mplayer or streamripper . Alternatively, create a stereo mix device that arecord may be able to use (I assume that would work assuming your distro uses pulse).


The reception wavers if I use the radio attached to my computer. The online stream sounds better. I did find a way to capture the online radio broadcast. In alsamixer, I activated the mix option so I can still use the arecord code I already have set up to record my shows in crontab. Seems to work great. I’m testing it at the moment to record at predefined times. Once recorded, I will go into audcity and trm the audio etc… We’ll see how that works. :slight_smile: