Click to See Complete Forum and Search --> : crontab to trigger xmms as alarm


leonz
08-17-2001, 05:44 PM
I tried to execute xmms as my alarm .. but it didn't work..

my crontab file:
----------------
#start of crontab file for leonz
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=leonz
HOME=/home/leonz

0 6 * * * xmms /home/leonz/mysong.mp3
0 6 * * * date > /home/leonz/datefile.dat
# end of crontab file

The second line works (write the 'date' command output to datefile.dat), but 'xmms' didn't work .. (nothing happened) ... :-(

Somebody please help me ..

cheers,
Leonz

Malakin
08-17-2001, 05:57 PM
Try using
"mpg123 /home/leonz/mysong.mp3"
It's a little better suited for running a script anyways.

leonz
08-17-2001, 06:03 PM
hey!
It works ...
thanks man :-)

any reason why the 'xmms' command not working? ... just curious ..

Linuxcool
08-17-2001, 06:12 PM
Does it work if you run it(xmms /home/leonz/mysong.mp3) from a command line? Maybe cron can't find xmms.

[ 17 August 2001: Message edited by: Linuxcool ]

leonz
08-17-2001, 06:15 PM
yes, it works if I run from command line..
inside the crontab, I have set the path: /usr/bin (since the 'xmms' is located there)..

I also have tried: /usr/bin/xmms mysong.mp3 inside the crontab .. but it was just the same .. didn't work ..

Linuxcool
08-17-2001, 06:49 PM
How about trying /usr/bin/xmms /home/leonz/mysong.mp3?

Maybe xmms doesn't like being run at the same time as date. Try using a different time as a test.

Malakin
08-17-2001, 07:09 PM
It probably wasn't working because the xmms output is set to arts when run under cron, the cron job was running as a different user and therefore couldn't connect to the arts server.