Go to advanced search

by peej
Fri Nov 21, 2014 9:39 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

It's really the same as the example above, only lots of it. There's 8 entries per day for 3 weeks. An example week looks like: # Wednesday December 10th 6 8 10 12 3 /usr/bin/mpg321 /home/pi/nonalarm1.mp3 35 8 10 12 3 /usr/bin/mpg321 /home/pi/nonalarm2.mp3 18 10 10 12 3 /usr/bin/mpg321 /home/pi/nonal...
by peej
Thu Nov 20, 2014 11:47 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Originally there were: alarm1.mp3 alarm2.mp3 alarm3.mp3 alarm4.mp3 nonalarm1.mp3 nonalarm2.mp3 nonalarm3.mp3 nonalarm4.mp3 But, I've since taken out the alarm*.mp3 files as I don't want them to play at the moment. This seems to work, but I still get the attempt to play them alongside the file reques...
by peej
Thu Nov 20, 2014 11:06 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Oops - forgot to say that I'm using crontab -e to edit, and when I do crontab -l, the file looks correct.

Oh, and there's nothing in the crontab other than a list of lines set up as above to play an mp3 once at a specific time.
by peej
Thu Nov 20, 2014 10:59 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Thanks very much both.

Apparently there's no directory /etc/crontab.

/var/spool/cron/crontabs contains only 'pi'

And, there's nothing in /etc/crontab.d

Does that help?
by peej
Thu Nov 20, 2014 10:05 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Thanks - there's no crontab for root according to sudo crontab -l, so I'm guessing it's not down to duplicate crontabs?
by peej
Thu Nov 20, 2014 9:22 am
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

OK - I spoke too soon... So, having amended the crontab so that a typical entry now looks like: 56 7 20 11 4 /usr/bin/mpg321 /home/pi/alarm2.mp3 the audio files do now play, and to schedule. However, looking again at the syslog, CRON is calling two files to be played at the same time, and only the s...
by peej
Wed Nov 19, 2014 6:56 pm
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Fantastic - super clear! Thanks very much all - I'll give it a go...

[Update - seems to be problem solved - thanks again!]
by peej
Wed Nov 19, 2014 3:43 pm
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Re: Using crontab to play audio

Thanks very much. Just to make sure - I'm a bit new to Linux - could you guess? :) - would I need to add a path to the 'mpg321' bit as well as the target mp3 file? A quick look at /var/log/syslog from what's been going on this afternoon gives: Nov 19 14:54:01 raspberrypi /USR/SBIN/CRON[2307]: (pi) C...
by peej
Wed Nov 19, 2014 2:41 pm
Forum: General discussion
Topic: Using crontab to play audio
Replies: 18
Views: 9143

Using crontab to play audio

Hi all, I've been trying to use crontab in Raspbian to schedule the playing of audio files. The audio files are only a few seconds long, and I've scheduled them to play at intervals over a period of 8hrs. When I test the crontab file to play audio within a few minutes of startup, everything works pe...
by peej
Sun Nov 16, 2014 9:19 pm
Forum: General discussion
Topic: Sharing 5v GPIO pin between RasClock & Relay Circuit
Replies: 2
Views: 809

Re: Sharing 5v GPIO pin between RasClock & Relay Circuit

Thanks David - I'll get soldering then!
by peej
Sun Nov 16, 2014 10:06 am
Forum: General discussion
Topic: Sharing 5v GPIO pin between RasClock & Relay Circuit
Replies: 2
Views: 809

Sharing 5v GPIO pin between RasClock & Relay Circuit

Hello all, I'm a bit of a beginner to say the least, but have recently started using Model A boards and Crontab to play audio files to a timed schedule. The project is being run off 12v, and away from the internet, so I'm using the Afterthought Software RasClock to provide the time: http://afterthou...

Go to advanced search