Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Interactive Cron

Posted by: MattBrown Dec 4 2008, 04:50 AM

Hi,
Could anybody tell me if it is possible to get cron to run a script that interacts with a user through terminal if they are logged on?

Basically I want a script to run at a certain time each day that will give the user 3 options then perform an action based upon their choice.


I have looked around on google and found a few references to this but nothing really useful if anybody knows where I may be able to find info on how to accomplish this I would be very grateful.

Thanks in advance
Matt

Posted by: michaelk Dec 4 2008, 08:24 AM

http://www.codecoffee.com/tipsforlinux/articles/23.html

Try:
X Y * * * DISPLAY=localhost:0.0 xterm "whatever blows your skirt.file"

Posted by: MattBrown Dec 7 2008, 10:29 AM

Hi,
Thanks for your reply, unfortunately this does not seem to work sad.gif

could this be because I am working in Terminal form Gnome at present?


Posted by: michaelk Dec 7 2008, 02:13 PM

If Gnome is running then this should work. I have not tried it out myself so I really do not know if the exact procedure will work or not.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)