Re: [SLUG] x window tk script to run from cron

From: Eben King (eben1@tampabay.rr.com)
Date: Sun Feb 27 2005 - 13:16:53 EST


On Sun, 27 Feb 2005, Larry Brown wrote:

> I have written a small script that will check a condition. If the
> condition check fails, it is supposed to produce a window in KDE that
> produces a message based on the condition response. This way I am
> alerted to the situation. I can run the script fine from the shell.
> However, I do not get a window when running it from cron.

Check that $PATH presented by cron contains the directory of each binary
that you call (and is called on your behalf). An easy way of verifying that
is to insert the cron job:

some_minute * * * * echo $PATH | mail -s PATH <you>

(you will receive 1 email per hour from this)

Copy what you get, and use it like so:

PATH='<paste here>' <that tk command>

If it fails, it's the PATH. Get around it by using absolute paths, or
prepending "PATH=$PATH:<what it lacks>" or prepend the whole PATH from a
shell session.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

Hi! I'm a .sig virus! Copy me to your .sig!

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:40:22 EDT