cron Solaris 5.8

From: Chris Vidal (cvidal_at_att.com)
Date: 04/06/04


Date: Tue, 6 Apr 2004 11:02:57 -0400


I remember reading a post on this topic in the past -- didnt save it --

This script run fine at the command line, but doesnt play nice under cron.

Can someone enlighten me, please ?

#! /bin/ksh
hnam=`hostname`
cat /opt/local/etc/hosts | sed -e '/^#/d' -e '/^$/d' | awk '{print $1"
"$2}' |
 while read x y
do
res=`ping $x`
echo "$y $res"
done

Thanks
Chris

begin 666 cvidal.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..CMC=FED86P-"D9..F-V:61A
M; T*14U!24P[4%)%1CM)3E1%4DY%5#IC=FED86Q 871T+F-O;0T*4D56.C(P
;,#0P-# V5#$U,#(U-UH-"D5.1#I60T%21 T*
`
end



Relevant Pages

  • Re: Nmon scheduling question
    ... command ran first then in the script is the ps and kill command so it ... Vince this is a great script. ... Cron Job with pid: 135238 Failed ...
    (AIX-L)
  • SUMMARY: cron entry: nth day of every month?
    ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
    (Tru64-UNIX-Managers)
  • Script wont run from cron
    ... the command line, but the same script fails when running from cron. ... The /bin/sh script runs, but when it goes to fire up the indexing process, ... set, id and limits. ...
    (freebsd-questions)
  • Re: Cron Job
    ... If you mean the computer itself, put that command ... The standard 'cron' runs jobs at a specific time/date. ... Init or @reboot run jobs when ... Sunday night at 02:00) then copy the script and cron entry. ...
    (comp.os.linux.misc)
  • Cron entry & .profile question
    ... Cron jobs can be confusing at times. ... When I run a script I wrote from ... The bourne shell uses the command "." ... Should I run my cron job as root or should I make a new cron entry ...
    (SunManagers)