LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2005, 12:06 PM   #1
usaf_sp
Member
 
Registered: Jul 2005
Location: Tennessee
Distribution: openSUSE
Posts: 419

Rep: Reputation: 30
Chime on the hour?


I know this is kinda silly, but does anyone know of an application that can cause the computer to play a sound on the hour? You know like a clock?
 
Old 10-25-2005, 12:30 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You use cron for scheduling.

You could do "crontab -e" to edit the cron file then add an entry like:

0 * * * * tput bel >/dev/console

The above tells cron to execute the command on every hour of every day.

"tput bel" sounds a beep and redirecting to the console makes it do the one on your PC.
You could redirect it to your terminal if not at the console but since this may not always be on or you may be on a different terminal each time this could be a problem.

You can also try it with audio sound files. Do "find / -name *.au" You can try doing a cat of one of those to your audio device for example:

0 * * * * cat /usr/java/jdk1.3.1_15/demo/applets/Animator/audio/8.au >/dev/audio

Before adding to crontab just try the command (without the 0 * * * *) at your command line.

Also it may be to short a sound for you. You could script it to do the sound multiple times to make it a little longer - for example:

Code:
#!/bin/bash
CNT=0
until [ $CNT -eq 5 ]
do tput bel >/dev/console
     CNT=`expr $CNT +1`
done
Would make it do the sound 5 times then stop.

Last edited by MensaWater; 10-26-2005 at 04:41 PM.
 
Old 02-24-2007, 11:47 AM   #3
thisbl3
LQ Newbie
 
Registered: Feb 2006
Posts: 28

Rep: Reputation: 15
I am wanting to do this also..I am useing damn small linux which I do not think has cron..or I can not find it..

I did install sox...could I use it rather than cat..ie sox/location of wav file/something ?..

.downloaded grandfatherclock via synaptic but it does not automatically chime on the hour although I did find the executable which when executed will chime the current hours...

I would prefer it only to chime once or twice rather than a chime for each hour..ie 11pm = 11bongs.
thanks for any help.
 
  


Reply



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
Aergh. X dies on the hour, every hour l00zer Linux - Software 4 06-07-2005 10:02 PM
change clock from 24 hour to 12 hour in suse 9.2/KDE 3.3 jmlumpkin Linux - Newbie 1 01-22-2005 11:45 PM
Preparing for 0 hour JoeUser11 Linux - Newbie 7 01-12-2005 12:24 AM
my first hour with debian... mipia Debian 11 04-11-2004 01:14 PM
Why is the time always an hour behind? aaa LQ Suggestions & Feedback 6 07-23-2003 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 AM.

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