Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Cron help 1

Status
Not open for further replies.

cp2000

Technical User
Dec 31, 2002
81
US
I've got a situation thats baffling me...

I sucessfully run cron jobs every nite on my solaris 8 system. I have problem with adding to that cron. I use crontabs -e to edit the file.
I can execute the file just fine directly.

File---
df -k > ./leon-test.log
echo `cat ./leon-test.log`
echo "This is the output from the df command"

cron entry---
26 * * * * /bin/sh /home/admin/leon.sh


Any ideas???????

Thx

Leon
 
hi,
Make sure file have execute permission,Try to mention the whole path of the files inside also.

rgds
 
Thanks for the reply...

Unfortunately I have already tried the 2 ideas. My original crontab entry didn't have the '/bin/sh' in it. I also have made sure that the file and path have execute privledge.
I did make a new discovery though in the /var/cron/log file. Apparently the job is failing because of "cron audit problem". I haven't yet been able to find any documentation on the error message. Any ideas??

THX
 
I am, indeed, using SSH. But that hasn't changed since the server was created. It's located remote from where I am. I also tried doing it both manually (with vi) and automatically with "crontab -e".

I donno
 
Did you run crontab /var/spool/cron/crontabs/${CRON_NAME}?

So if it is the root crontab and you updated it, run this:

crontab /var/spool/cron/crontabs/root

That should tell cron that something has changed and it will pick up those changes, though I though crontab -e did this for you...not sure, just a thought.
 
not sure about this but you could try :

# ps -ef|grep cron

get the process id from this command and then type

# kill -1 process-id

Where "process-id" is the real process id number.

the "-1" should force the system to re-read the crontab

let me know if this helps


*** Theres more than one way to skin a cat ***
 
The Latest update----

It does appear to be an issue between SSH<->Audit. I had occasion to log in locally on the Machine Friday. I manually updated the crontabs and theyy are working just fine.
I have tied modifying the SSH config files but it doesnot seem to have an effect. I have read through Annihilannic's reccomednded article on Sunmanagers list (THNX for starting me down the right path!!). Unfortunately the underlying problem remains.

I will continue to research and update the forum as I find anything. As usual any suggestions are very much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top