🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.sysadmin
4 messages
4 total messages Started by Mark Crispin Sat, 26 Sep 1992 20:54
Re: 3.0: what gives with cron
#1563
Author: Mark Crispin
Date: Sat, 26 Sep 1992 20:54
12 lines
1185 bytes
I encountered the same problem with cron in 3.0.

I'll bet you're piping your backup data to rsh, eh?  Sorry, bunkie; rsh in 3.0
does not work under cron.  I spent several hours on this problem and fairly
conclusively proved that rsh just dies silently when it is run under cron.

Don't think of trying an old rsh from 2.1 and seeing if that will work; you'll
get a no such host name error.

I reported this bug to NeXT.  Judging from past performance, we can expect to
see this fixed sometime in 1995.  After all, 3.0 finally fixes some bugs we
reported in 0.8 days.
Re: 3.0: what gives with cron
#1574
Author: Steve Hayman
Date: Mon, 28 Sep 1992 05:17
39 lines
1905 bytes
>I'll bet you're piping your backup data to rsh, eh?  Sorry, bunkie; rsh in 3.0
>does not work under cron.  I spent several hours on this problem and fairly
>conclusively proved that rsh just dies silently when it is run under cron.


One possibility is that it could be a problem with $PATH.  If you add
something like this to /etc/crontab

	* * * * * root echo path is $PATH >/dev/console

and then look at the message in the console window, you'll see that
cron is using "/etc:/usr/etc:/bin:/usr/bin" as a default PATH.  Note the 
conspicuous abscence of "/usr/ucb", home of rsh, finger and many other programs.
So cron won't find those programs uness you go out of your way to
give it a better PATH.  I.e. crontab lines like this

	* * * * * root rsh somewhere blah blah

will fail silently.

You could fix this in 2 ways - the obvious way is to hard code the
pathname you want ...

	* * * * * root /usr/ucb/rsh somewhere blah blah

or, alternatively, if you're trying to execute a shell script,
you can add "PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin export PATH"
to the script you're executing.  (Setting the PATH explicitly is a good
idea for scripts in general.)

Also alternatively you could get the Paul Vixie public domain
cron replacement program, which has many useful features not found
in the standard cron.

Hope this helps someone.
Steve

-- 
Steve Hayman          Systems Engineer, NeXT Canada      Steve_Hayman@NeXT.com
Re: 3.0: what gives with cron
#1581
Author: Meinhard E. Mayer (Hardy)
Date: Mon, 28 Sep 1992 18:53
9 lines
984 bytes
In my limited experience with cron I ALWAYS specify full pathnames to
the scripts/programs to be run; I also usually make the scripts log 
errors to some file in /tmp or /usr/adm, so I can check whether cron
has worked at all. 
--
Hardy 
-----
Meinhard E. Mayer,  Department of Physics, UC Irvine 
e-mail: hardy@golem.ps.uci.edu (preferred) or MMAYER@UCI.BITNET
Re: 3.0: what gives with cron
#1765
Author: Steve Hayman
Date: Mon, 05 Oct 1992 18:20
18 lines
1238 bytes
One last quick point on this thread about what cron does with $PATH - after
checking a bit more, it appears that cron doesn't set the path itself, it
merely inherits whatever path is in effect when it's launched.  Note that
/etc/rc does this:

    PATH=/etc:/usr/etc:/bin:/usr/bin; export PATH

so anything launched from rc inherits this path.

It seems to me that you could add /usr/ucb to this list without
hurting anything (except for the idea of not tinkering with system files
if you can avoid it.)


Steve
-- 
Steve Hayman          Systems Engineer, NeXT Canada            Toronto, Ontario
NeXT mail: Steve_Hayman@NeXT.com                                 (416) 607-4059
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads