need ubuntu to work as an alarm clock for multiple alarms. Each alarm will have it's own unique mp3 and each day alarms will vary in time.

Asked by James Perreault

We replaced our 24 year old church chime system with an asus EEE PC. We need an application that will work like an alarm clock. We need a minimum of 4 alarms per day. The alarm will vary in time according to the day/holiday & Day light savings. We also need a way to automatically restart the PC and launch the software in the event of a power failure so the system is Maintenance free. IE. not requiring user intervention.

I was originally drawn to the dark side by MS Windows XP running Win Amp with an alarm plug in. It worked fairly well except it kept dropping events and could only schedule Sunday - Saturday with out making exceptions for holidays.

I thought about using kron jobs, but am such a newbie that this is beyond my ability and experience at this time.

What our church needs is an application that will:
1] automatically startup when Ubuntu is powered on.
2] play alarms Monday - Saturday at 10:00, 12:00, 14:00 and 16:00.
     Sunday September 1st. to June 30th 9:30, 9:45, 12:00, 14:00 and 16:00.
     July & August Sunday @ 9:15, 9:20, 12:00, 14:00 and 16:00
     We also need to make exceptions for Religious holidays like Good Friday and Easter Monday and Christmas.

    To add one more twist there are approximately 24 MP3 files that we need to randomly play one tune for each alarm from post Ukrainian Christmas until Remembrance Day. There are 25 Christmas tunes we would like to randomly play from November 12th up to the end of Ukrainian Christmas and patriotic tunes for Remembrance Day & Canada Day.

I was originally hoping to be able to use Evolution. Unfortunately getting the alarms to work has proven a little more of a challenge that I originally anticipated. My second issue is being able to get Ubuntu to automatically log in and launch this application. In short I need to have minimal user intervention.

Any Ideas or gifted programmers would greatly be appreciated.

James
:0)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
James Perreault
Solved:
Last query:
Last reply:
Revision history for this message
Theodotos Andreou (theodotos) said :
#1

You could use cron too launch a media player like mplayer or vlc

Revision history for this message
James Perreault (perimap) said :
#2

This is the problem. I don't really know the syntax on how to do this. Do you know how to? If so could you give me an example Please...

I've never done this and don't know how. In windows It would be easy to write a batch job to do most of this, but I want something that requires less maintenance.

James

Revision history for this message
A. Denton (aquina) said :
#3

Oh guys this is really amateur stuff. ;-)

Try "vlc --help" from a shell to get an idea. U can also load complete playllists ther maybe for one day or so. Next give it a try with e.g. "vlc file://home/Music/foobar.mp3" if your desired single file you wanny play is named "foobar.mp3". To add one of these commands I mentioned ot a cron job try to install "KCron" for KDE or something more native like "Gato Command Schduler". To execute single programs on start you can also install "Kickstart."

Hope it helps you out! ;-)

Revision history for this message
James Perreault (perimap) said :
#4

Ya got the command line and pathing figured out. Still having issues getting kcron to launch VLC to actually do what I need to do. Almost there. This is exactly what I was looking for. Originally I didn't know how to launch VLC, got the pathing done and from terminal I can launch the tunes... Just can't seem to get kcron to launch.. So close, yet so far way.

James
:0)

2/3rd there.

2 lefts don't make a right.... But 3 do.......

Revision history for this message
Theodotos Andreou (theodotos) said :
#5

If you do not want to learn cron then kcron is pretty straightforward as it is a GUI tool and you can select the scheduling you want from the buttons provided.

If you want to learn cron on the command line a nice tutorial is at:
http://linuxgazette.net/151/prestia.html

To automatically start a program/ script you need to include the command to start it in the "/etc/rc.local" file

Revision history for this message
James Perreault (perimap) said :
#6

I appreciate the suggestions....

I would love to do this using Kcron. It would be ideal for the customization I require but getting the jobs to fire up and actually working is testing my patients. I have loaded in Kcron and all the KDE libraries in Ubuntu. Followed the suggestions of confirming all the required things are done and made sure I saved the task, Yet Kcron failed to fire up. Maybe it would be better to run Kubuntu instead of Ubuntu. All I know is that this is getting frustrating.

I think I may have to delve back into the Dark Side of the Force. I wanted to do this in Ubuntu, but there is a time to admit defeat and time is an issue... So I may have to go back to Windows.

Has anyone successfully run Kcron on Ubuntu to play a media file? I know that I am not alone in my frustration.

If you know the syntax and could take a minute to show me the syntax I would be forever indebted. I really believe that Ubuntu is the best solution for this application and KCron and VLC both do what I want... I just need a way to figure them out for Hardy Heron.

James
"The old dog" - no new tricks.

Revision history for this message
Theodotos Andreou (theodotos) said :
#7

The first 5 columns are numbers that represent these quantities:

          Minute - 0-59.
          Hour - 0-23 24-hour format.
          Day - 1-31 Day of the month.
          Month - 1-12 Month of the year.
          Weekday - 0-6 Day of the week. 0 refers to Sunday.

A complete example follows:

# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-6) command
   34 2 * * * sh /root/backup.sh

The above command will run every weekday (mon - sun), every month(1-12), every day (1-31) at 02:34

Revision history for this message
James Perreault (perimap) said :
#8

Finally found a working solution that was easy.

Found an application called Alarm Clock 0.09.10 written by Tomasz Salacinski. Application was found at

 http://linux.softpedia.com/get/Office/Scheduling/Alarm-Clock-31341.shtml
This is a fantastic application that is easy to use and is exactly what I was looking for.

Thanks for the other suggestions

:0)

James

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#9

James, the Alarm Clock is available also into universe/utils Ubuntu repositories.
Enable the Universe repository from System->Administration->Software sources
and you can install as usual.
So you can keep automatically updated the alarm-clock app.

HTH