[WBEL-users] Using cron for auto tasks

Pete Cervasio pcervasio@onairusa.com
Thu, 26 Feb 2004 12:25:35 -0600


On Thursday 26 February 2004 11:02, Sharon Kimble wrote:
> You are exactly right, sylpheed is a GUI-app [my favourite email proggie
> :) ] and it barfs wehn run through cron. Any ideas how to get it to
> display please?

Hi Sharon.  The reason it doesn't like to run from cron is most likely because 
the DISPLAY variable isn't set.  It won't like running from cron.daily 
either, since those jobs are run as root, and you're (hopefully!) logged in 
as a regular user.  You'll want to run "crontab -e" as yourself and add the 
following line, which assumes you want to run this at 05:00 every day (change 
the two numbers as appropriate).  I just tested this on the Redhat 8 box 
sitting next to me, using xterm instead of sylpheed, and it properly popped 
an xterm up on my screen when the time came to do so.

	0 5 * * * DISPLAY=:0.0 /usr/local/bin/sylpheed

Also note: The DISPLAY variable may need adjusting for your particular setup.  
If you "echo $DISPLAY" from a command prompt you'll see if it's different.

Good luck!
Pete C.

-- 
=====================================================================
On Air Digital USA                            http://www.onairusa.com
Dallas, Texas                  a division of Smarts Broadcast Systems

Light travels faster than sound.  This is why some people appear
bright until you hear them speak.........
=====================================================================