Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> ? on Running a Cron Job
a31modela
post Oct 23 2006, 04:26 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 23-October 06
Member No.: 7,555



Hello All,

I am trying to run a cron job that will restart an application every morning @ 5:10 on SuSE 8. The script runs fine from a non x window command line. The 1st thing the script is supposed to do is pop up an xmessage about the pending restart of the app. i am runing the script as root & the XWin is running as a specific user account. My script has the following in it at the top :
export DISPLAY=`hostname -i|cut -d " " -f 1`:0.0


xmessage -center " Terminal needs to reboot & will reboot in 5 minutes " -timeou
t 300 -buttons OK:1,CANCEL:2
ANS=$?

The entire script works as written when run from the command line as root BUT if running as root from cron.d it never shows the xmessage, just starts the recycle of the application.

Is there any way that I can have this job run as a cron job & export the Display as needed?

Thanks
Steve
Go to the top of the page
 
+Quote Post

Posts in this topic
- a31modela   ? on Running a Cron Job   Oct 23 2006, 04:26 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 07:28 PM