Shell Programming and Scripting

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Crontab issue

👤 Login to reply

    #1  
Old 04-01-2013
lovelysethii lovelysethii is offline
Registered User
 
Crontab issue

hi,

i have schduled a job through crontab, but it is not getting executed.
bash-3.2$ crontab -l
# Monthly Download (mm hh DD MM format)
35 05 01 04 * /home/ftpsrp/srpftp1/download/ofrdb/scripts/load_ofrdb.sh crr.sh

here is the permission of the .sh files
-rwxr--r-- 1 ftpsrp srp 9433 Apr 1 04:07 load_ofrdb.sh
-rwxr--r-- 1 ftpsrp srp 12217 Apr 26 2007 crr.sh

what do i need to check here, please suggest??
its urgent so any quick reply is highly appriciated.
Sponsored Links
    #2  
Old 04-01-2013
RudiC RudiC is offline Forum Staff  
Moderator
 
Did it start and crash, or did it just simply not run? Check the system log files for cron entries. It's wise to create and keep an error log file redirecting stderr to a file...
Sponsored Links
    #3  
Old 04-01-2013
lovelysethii lovelysethii is offline
Registered User
 
it didn't get start because logfile has not been modified.

-rw-r--r-- 1 ftpsrp srp 16779 Mar 26 01:01 load_ofrdb.crr.sh.log

how could i check the system log files for cron entries?
    #4  
Old 04-01-2013
RudiC RudiC is offline Forum Staff  
Moderator
 
If you have the permissions, less or grep cron the log files in /var/log, e.g. messages.
Sponsored Links
    #5  
Old 04-01-2013
lovelysethii lovelysethii is offline
Registered User
 
now i tried to run the file manually then i got below message:

bash-3.2$ sh load_ofrdb.sh crr.sh
load_ofrdb.sh: syntax error at line 4: `ORACLE_HOME=$' unexpected
Sponsored Links
    #6  
Old 04-01-2013
RudiC RudiC is offline Forum Staff  
Moderator
 
So - did the cron job start and crash, or did it plainly not run?
Sponsored Links
    #7  
Old 04-01-2013
lovelysethii lovelysethii is offline
Registered User
 
it seems that cron starts but ended up with some error, i checkd the email in cat /var/mail//ftpsrp

From ftpsrp@usa0300uz1180.apps.mc.xerox.com Mon Apr 1 09:27:02 2013
Return-Path: <ftpsrp@usa0300uz1180.apps.mc.xerox.com>
Received: from usa0300uz1180.apps.mc.xerox.com (localhost [127.0.0.1])
by usa0300uz1180.apps.mc.xerox.com (8.14.4+Sun/8.14.4) with ESMTP id r31DR2LG007245
for <ftpsrp@usa0300uz1180.apps.mc.xerox.com>; Mon, 1 Apr 2013 09:27:02 -0400 (EDT)
Received: (from ftpsrp@localhost)
by usa0300uz1180.apps.mc.xerox.com (8.14.4+Sun/8.14.4/Submit) id r31DR2vk007225
for ftpsrp; Mon, 1 Apr 2013 09:27:02 -0400 (EDT)
Date: Mon, 1 Apr 2013 09:27:02 -0400 (EDT)
From: Supplies Reporting FTP <ftpsrp@usa0300uz1180.apps.mc.xerox.com>
Message-Id: <201304011327.r31DR2vk007225@usa0300uz1180.apps.mc.xerox.com>
To: ftpsrp@usa0300uz1180.apps.mc.xerox.com
Subject: Output from "cron" command
MIME-Version: 1.0
Content-Type: text/plain
Content-Length: 166

Your "cron" job on usa0300uz1180
/home/ftpsrp/srpftp1/download/ofrdb/scripts/load_ofrdb.sh crr.sh

produced the following output:

stty: : No such device or address


and in .profile file here is the code for stty stty erase '^?'

please help
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab issue h@foorsa.biz AIX 3 05-02-2011 03:55 AM
Issue with crontab Sriranga Shell Programming and Scripting 12 06-24-2010 09:19 AM
crontab issue mac4rfree Shell Programming and Scripting 2 06-30-2009 05:51 AM
crontab issue vaddi HP-UX 11 01-28-2008 05:07 AM
crontab issue Semper_Tempus Solaris 6 07-19-2005 10:13 PM



All times are GMT -4. The time now is 01:32 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?