On 27-Aug-01 Bruce Marshall wrote:
On Monday 27 August 2001 05:21 pm, Ray Booysen wrote:
is the path needed. I need to send a signal. I want to run "killall -TERM proxyper" as the command. Will this work as it is?
Dunno... You'd have to try it. I suspect the path is needed.
I'd reccomend always putting in the full path; that way you're
safe.
Cron sets up some environment variables for the commands it runs
according to the user who owns the crontab file. For instance,
it picks up $HOME from the user's entry in /etc/passwd (see
man 5 crontab). So you could certainly have a crontab line like
* * * * * $HOME/bin/myprog
But $PATH is very much a "dynamic" variable for a user, and there's
no reliable way cron could look for a user's particular current
$PATH.
If you want to make sure that cron uses a particular $PATH you can
set this in the crontab file, with a line like
PATH="/the/path:/you/want:/to/use"
(nothing else: this sort of crontab line is not time-linked and
so is global) in which case you can omit full paths from the cron
commands provided they're covered by the crotab $PATH.
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding)