Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am wanting to add an hourly chime to damnsmall
I installed sox.dsl and cron30.dsl
I have a chime.au fileI added to /opt/bootlocal.sh...sudo /etc/init.d/cron/start
I added to /home/dsl/filetool1st...etc/crontab
I type in console..play /home/dsl/chime.au
the chime soundsI first opened the /etc/crontab file and added
0 * * * * play /home/dsl/chime.authis did not work
second I opened beaver and typed the same line and saved the file to /home/dsl and called it chimeron
I then opened a console window and typed crontab /home/dsl/chimeron
this created a dsl file in var/spool/cron/crontabs/dsl
when I open the dsl file it shows the line and can be altered via the same processthis did not work
can anyone help me

beany,
it might help to provide the full qualified pathname to command "play" (in the crontab entry)
cheers
wollie

Thanks
I replaced the var/spool/cron/crontabs/dsl file with a new one with the line
0-59 * * * * /usr/bin/play /home/dsl/chime.authinking it may chime every minute as test
but it will still not chime
try also removed the space- /play/home/
the filetool1st entry is etc/crontab
I did not make change to the /etc/crontab
but did not think I had to and did not know how to replace it with the new one if I didwhen I boot it lists cron as starting
any other thoughts
I really really want this to happen
thanks for any

I use Mandriva Linux here, and I have a directory:
/etc/cron.hourly
Any executable script I put in this directory is executed each hour.
You can create a script named perhaps chime.sh (because it will sound a chime):
-------------------------
#! .bin/sh# sound a chime
play /home/dsl/chime.au
end
-------------------------As root, save this file as:
/etc/cron.hourly/chime.sh
then make it executable:
chmod +x /etc/cron.hourly/chime.sh
If you do not have this directory (/etc/cron.hourly), as root, save the script as:
/usr/local/bin/chime.sh
make it executable:
chmod +x /usr/local/bin/chime.sh
and set up a cron job:
* 0-24 * * * /usr/local/bin/chime.sh
HTH,
Ernie Registered Linux User 247790
ICQ 41060744

Thankyou
I would like to try this as I have a dir /etc/cron.hourly
the info file for cron.dsl said that I may opt to put executables in there as long as I change the filetool entry to /etc/cron.hourly I assume this means the /home/dsl/.filetoo1st file as I put the /etc/crontab entry therehowever I am unclear on the creation and how to delete if it does not work
in a console I could not get a editer to open so I used beaver to save a file and then in a console typed crontab file to get the var/spool/cron entry this can be removed with crontab -r
can I type the script in beaver and save.. then type in a console window as root
$ save /location/file /etc/cron.hourly/file.shthen proceed as mentioned? to make executable
how do I delete this if it does not work safely
sorry...I am new to all this and need baby talk..it is a simple function but required to make the system useful for me
I do not want to mess up what I have managed after MANY hours to create
many thanks for what you offered and many more for any additional assistance

well..I could not help jumping in head first
I typed the script in beaver
#! .bin/sh
#sound a chime
play /home/dsl/working/zsnd/chime.au
end(this directory /working/zsnd/chime.au is for safe storage of the chime.au so it will not be lost amoung home and working files)
and saved as chime.sh
and suprise it saved as chime.shI opened emlfm as a superuser and copied the file to /etc/cron.hourly
in the root box below I typed chmod +x /etc/cron.hourly.sh
this changed the color of the file green that indicates it is executable
I changed the filetool1st entry to etc/cron.hourly
there was no chime on the hour : (
when I right click the chime.sh in cron.hourly and execute...I get the following error
sh: ./chime.sh: .bin/sh: bad interpreter: no such file or directory
I rebooted
is there a repair
can I delete at willdoes the /etc/crontab play any part?
it has default entries for daily, monthly, weekly but no hourly and I do not have a var/cron/log
thanks for any

note to self...wait to post
I was inspired to read some scripting info and replaced #! .bin/sh with /bin/bash
the file will now execute without error
I await the top of the hour.

well..going to /etc/cron.hourly I can execute the script but
did not play on the hour
three days
i'm going to cry

Thanks folks so much for the bits
thanks, yes, If you use the crontab you need to use the complete path to play
0 * * * * /usr/bin/play /home/dsl/chime.au
also I moved the executable script chime.sh to /usr/local/bin/chime.sh
what was missing I discovered after going to cry was
ROOT
In both cases this is nessessary
0-59/1 * * * * root /usr/bin/play /home/dsl/chime.au
after reboot this plays chime every minutechanged to
0-59/1 * * * * root /usr/local/bin/chime.sh
will play chime every minuteI like the chime.sh as the hourly as I can edit and change the sound to another and save and it plays the new sound on the hour ,,thanks for the code...and inspiration to other scripts
I can use the other for additional reminders like whistleing on trashday or well I'm going to play
DONE..kinda
Thanks so much for the assistance I am so very happy

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |