LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2017, 03:16 AM   #1
XAntares
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Rep: Reputation: Disabled
Radio record with cronjob


Hi,

I like to record a radio stream with cronjob (with linux mint).

This should be every sunday from 10am to 01pm.

I had create a sh-file with at:

Code:
echo 'Kommando' | at 09:55
streamripper http://sunshinelive.hoerradar.de/sunshinelive-live-mp3-hq -a /home/madand/Musik/$(date +%x_%X).mp3 -l 11400
But there is no mp3 file visible on home/madand/musik
 
Old 02-05-2017, 03:32 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,695
Blog Entries: 3

Rep: Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923
cron has a different environment than your regular shell and PATH is one of the variables that is different. So your script should either explicitly set the contents of PATH early on or else each program, such as streamripper, need to use their full path.
 
Old 02-05-2017, 06:34 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,643

Rep: Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191
At and cron are not the same. For a cron job to run every Sun would be

55 09 * * sun /path/to/my-script

my-script

streamripper http://sunshinelive.hoerradar.de/sun...ve-live-mp3-hq -a /home/madand/Musik/$(date +%x_%X).mp3 -l 11400

To create the job run crontab -e which typically runs vim. You can find lots of examples on using vim and creating cron jobs.

See man crontab for help.
 
Old 05-04-2017, 10:40 AM   #4
XAntares
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
many thanks for your reply.

I hope, this will work with vim.

Greetings XAntares
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Program to 'timer record' radio blueinca99 Linux - Newbie 2 05-18-2014 05:27 AM
Record live radio streams with Slackware 13.37 glupa4e Slackware 9 05-06-2012 10:18 AM
record online Internet radio to file without a sound card on DD-WRT router totaluser Linux - Software 2 11-25-2011 01:07 PM
LXer: Bah humbug commercial radio, hurrah for Internet radio LXer Syndicated Linux News 0 05-02-2006 10:03 PM
Tools to record internet radio broadcasts HwzrHlslndr Linux - Software 6 09-17-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration