
I put this line into my crontab: 29 21 * * * xmms -p /home/adagilson/acordar.m3u Although, the command line: xmms -p /home/adagilson/acordar.m3u ...can play a list of mp3 very fine when executed by a Gnome terminal, it is not working with Cron. Take a look at the result from the command CRONTAB -L: $crontab -l #vi crontab 29 21 * * * xmms -p /home/adagilson/acordar.m3u :wq!#You have new mail in /var/spool/mail/adagilson This is the MESSAGE SENT BY CRON: Message 15:
/bin/sh: xmms: command not found Thanks for any help a. John Pettigrew escreveu:
HTH John ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

On Friday 19 September 2003 23:50, wrote:
Provide the fullpath to xmms. Depending on the user that Crontab executes xmms as, it may not be in it's path. Probably, crontab doesn't have a $PATH var. /usr/bin/xmms in place of plain xmms should work -- The Meek shall inherit the Earth, for the Brave are among the Stars!

So, I did what you suggested and no cron messages are being sent to me, but it still doesn't play any sound at scheduled time. Take a look at CRONTAB -L command: $crontab -l #vi crontab 29 21 * * * xmms -p /home/adagilson/acordar.m3u :wq!# Does crontab understand all bash commands? Any more ideas? Thanks for helping a. Daniel Joyce escreveu:

On Tuesday 23 Sep 2003 2:27 pm, Adagilson Batista Bispo da Silva wrote:
Just out of curiosity I tried it and it doesn't work. I put it to my colleague who seems to think that it fails because cron needs to activate the xserver which it is unable to do. So if there is a way to get cron to run x apps then I guess it will work. Perhaps someone else may be able to chip in and provide the missing link. Eddie

On Tuesday 23 September 2003 15:57, eddie wrote:
It needs to access an X server, yes. If there is one running, make sure the cron job is started as the user that runs the X server, and that the environment variable DISPLAY is set correctly for cron. If there isn't one running you need to start one. If it's a headless box you could consider running the X virtual frame buffer. The same considerations for the running user and the DISPLAY variable apply

eddie wrote:
Perhaps someone else may be able to chip in and provide the missing link.
It won't work, I can't give a short explanation why. Try using mpg123 or mpg321 and suppress the output if mpg123/321 have an option for that.

On Friday 19 September 2003 23:50, wrote:
Provide the fullpath to xmms. Depending on the user that Crontab executes xmms as, it may not be in it's path. Probably, crontab doesn't have a $PATH var. /usr/bin/xmms in place of plain xmms should work -- The Meek shall inherit the Earth, for the Brave are among the Stars!

So, I did what you suggested and no cron messages are being sent to me, but it still doesn't play any sound at scheduled time. Take a look at CRONTAB -L command: $crontab -l #vi crontab 29 21 * * * xmms -p /home/adagilson/acordar.m3u :wq!# Does crontab understand all bash commands? Any more ideas? Thanks for helping a. Daniel Joyce escreveu:

On Tuesday 23 Sep 2003 2:27 pm, Adagilson Batista Bispo da Silva wrote:
Just out of curiosity I tried it and it doesn't work. I put it to my colleague who seems to think that it fails because cron needs to activate the xserver which it is unable to do. So if there is a way to get cron to run x apps then I guess it will work. Perhaps someone else may be able to chip in and provide the missing link. Eddie

On Tuesday 23 September 2003 15:57, eddie wrote:
It needs to access an X server, yes. If there is one running, make sure the cron job is started as the user that runs the X server, and that the environment variable DISPLAY is set correctly for cron. If there isn't one running you need to start one. If it's a headless box you could consider running the X virtual frame buffer. The same considerations for the running user and the DISPLAY variable apply

eddie wrote:
Perhaps someone else may be able to chip in and provide the missing link.
It won't work, I can't give a short explanation why. Try using mpg123 or mpg321 and suppress the output if mpg123/321 have an option for that.
participants (6)
-
Adagilson Batista Bispo da Silva
-
adagilson@cpqam.fiocruz.br
-
Anders Johansson
-
Daniel Joyce
-
eddie
-
Silviu Marin-Caea