[olug] Anybody know anything about cron?
Jake Churchill
jachurchill at cox.net
Wed Dec 29 02:58:18 UTC 2004
I'm trying to set up cron to be an alarm on my box and to start playing
a song or playlist using xmms. Nothing seems to work. I am on Mandrake
10.1 and all security is set to standard. After much trial and error and
using this forum I got it to work by setting a script called 'alarm'
with the following syntax:
#!/bin/sh
export TERM=xterm
mpg123 "<song_title>"
and my crontab looks like:
* * * * * <home>/alarm
First of all, yes the script is executable and the <home> and
<song_title> are the actual directory and song title.
That worked fine but it will load mpg123 in xterm and I can't see it so
I have to manually search out the PID using 'ps aux | grep mpg' and kill
it manually.
I know I've done this on previous versions of Mandrake where my crontab
was a very simple line such as: * * * * * /usr/bin/xmms "<song_title>"
Anyone know any ways of making cron start an X app?
By the way, as a test, I ran a cron job to do: * * * * * /usr/bin/xmms
and redirected the output to a log file and got the following message:
"** CRITICAL **: Unable to open display".
So, I thought to add localhost to the xhosts access control using "xhost
+ localhost". It was successfully added but still nothing.
I've tried using "at" also and it won't work and I've tried creating
cron jobs through webmin and when you click on the link there is nothing
there, the page doesn't even move.
Any suggestions?
More information about the OLUG
mailing list