How to use Cron ?Forum: HD Install Topic: How to use Cron ? started by: manishsadh Posted by manishsadh on April 03 2007,14:23
Hi Folks,my system - dsl 3.2 frugal need some help with running cron. i edited the /etc/crontab file and added the following 0 10 * * * * /home/dsl/xx.sh then i ran the MyCron from system -> control panel. at 10 am the scheduled script didnt run. what i am i missing ? is there a specific cron howto for dsl ? thanks. Posted by robc on April 04 2007,16:47
manishsadh, you can have cron output to a file, including errors, to view. To do this use the following line in your crontab:
I am having trouble with cron also. It runs, but will not open gui applications. When I use the following line in the crontab:
The application does not open and I get this in nohup.out:
I get similar results for all gui applications that I try to open with cron. All the applications do run when I use Aterm or click on an icon. Though they will run if I use the following line in crontab instead:
but then I have an extra xterm window open that I don't want. I'm not sure if this is a problem with gtk or with cron. I also tryed using cron to start a script that would call a gui program and I got the same results. the script would run, but the application I wanted to start did not. Does anyone know of a fix for this or have any guidance for this situation? Thanks Rob Posted by jimmit on April 11 2007,22:12
I was having the same problem.I had a shell script that used xset to turn the screen off. I had to launch the script with /bin/bash instead of sh and I had to add "export DISPLAY=:0" to the beginning of my shell script. In your case you may want to create a script such as this...
I hope that helps! -James Posted by robc on April 12 2007,14:38
jimmit,I added the export line to my script and now it works with cron. Thank you for the tip. Rob |