![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with cron job | solne | SUN Solaris | 7 | 01-18-2008 05:57 PM |
| cron problem! | blowtorch | UNIX for Advanced & Expert Users | 4 | 03-07-2006 10:12 PM |
| Problem with cron | jhansrod | AIX | 2 | 11-25-2005 01:30 PM |
| cron problem | VPN | UNIX for Dummies Questions & Answers | 2 | 04-16-2004 03:27 AM |
| Cron Problem | Raiden | Shell Programming and Scripting | 4 | 11-16-2003 04:00 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I am facing a problem in cron.following are i found and i cant able to find where the problem is exactly...... 1> in cron log(/var/adm/cron/log) i found that the cron start my process and it gives PID also but after that it didnt gave any thing like process is failed or sucessfull. 2> I checked current process. and concern process is not running currently. 3>i ran the same script(which i have entered in cron) and i found that it is working fine without any error. so how can i confirm that the particular script is run sucessfully or failed????? Thanks in Advance |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
1) do what you expect from cron: write logs. The cron log logs the cron activity, not the activity of the processes started by it. Put some logging messages into your script and write your own log to find out where it goes wrong, like this:
Code:
#! /bin/ksh # set your environment.... print - "starting script with PID $$" > $logfile ... some commands..... print - "now here" >> $logfile ... some more commands .... print - "and now here" >> $logfile ... even more commands ... print - "finished the script" >> $logfile exit 0 2) Take the measure Nr 1 for all problems of the i-have-written-a-script-and-it-works-but-i-put-it-in-cron-and-it-failed-type: set that damn environment because cron won't do it for you! Hope this helps. bakunin |
|||
| Google The UNIX and Linux Forums |