![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unable to sftp with cron (once more time...) | Kronos | UNIX for Dummies Questions & Answers | 7 | 05-06-2009 10:21 AM |
| unable to schedule events through cron | rakshit | HP-UX | 7 | 01-31-2008 04:57 AM |
| schedule many jobs using cron | sireesha15 | UNIX for Dummies Questions & Answers | 1 | 11-28-2006 11:20 PM |
| How to Schedule job using cron(URGENT) | ravi.sadani19 | Shell Programming and Scripting | 2 | 01-23-2006 07:10 AM |
| Cron to schedule 1st Wednesday of every Month?? | bradtri | Shell Programming and Scripting | 5 | 10-20-2004 12:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
unable to schedule in cron
the follwing script is running fine , when run from the ksh shell...it runs properly i.e. waits for a file "test.flag" and sends mail accordingly.
But when I schedule it in the crontab ...it does not run at the specified time (it never runs). I am using ksh ####shell script starts count=1 while true; do if test -f test.flag then mailx -s "File Found" s.ba@dsc.com s.ba@hcil.in </man/prd2/bat/tmp/found.txt exit 0 fi let count="$count + 1" #####count=$(( $count + 1 )) sleep 2 ####wait (2) if [ $count -gt 300 ] then mailx -s "File not Found" s.ba@dsc.com s.ba@hcil.in </man/prd2/bat/tmp/not_found.txt exit 0 fi done ####shell script ends ###ran crontab -l 20 11 * * * /sa/p/brd/tmp/mailer.sh ##### ran uname -X System = SunOS Node = ritba Release = 5.8 KernelID = Generic_108528-24 Machine = sun4u BusType = <unknown> Serial = <unknown> Users = <unknown> OEM# = 0 Origin# = 1 NumCPU = 2 Please suggest, (the path of .txt files is correct) Last edited by ace@123; 01-06-2009 at 01:13 AM.. Reason: added info |
|
||||
|
Check "man crontab" for the exact location of cron's files on your system.
Please state the unix/Linux version - there is much variation. In general: Check /usr/adm/cron/log to see if the job ran at all. Run "fuser /usr/adm/cron/log" and check there is a process using the log (i.e. cron is running). Check mail for the user of the cron for error messages. Check /usr/adm/cron/cron.allow and /usr/adm/cron/cron.deny to make sure that the user is allowed to run a cron. |
|
||||
|
Path is correct ...
|
| Sponsored Links | ||
|
|