Unix/Linux Go Back    


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

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
lovelysethii lovelysethii is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 7 August 2015, 1:19 AM EDT
Posts: 91
Thanks: 6
Thanked 0 Times in 0 Posts
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 Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
RudiC RudiC is online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 November 2017, 4:15 AM EST
Location: Aachen, Germany
Posts: 11,641
Thanks: 320
Thanked 3,618 Times in 3,323 Posts
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 Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
lovelysethii lovelysethii is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 7 August 2015, 1:19 AM EDT
Posts: 91
Thanks: 6
Thanked 0 Times in 0 Posts
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 Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
RudiC RudiC is online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 November 2017, 4:15 AM EST
Location: Aachen, Germany
Posts: 11,641
Thanks: 320
Thanked 3,618 Times in 3,323 Posts
If you have the permissions, less or grep cron the log files in /var/log, e.g. messages.
Sponsored Links
    #5  
Old Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
lovelysethii lovelysethii is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 7 August 2015, 1:19 AM EDT
Posts: 91
Thanks: 6
Thanked 0 Times in 0 Posts
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 Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
RudiC RudiC is online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 November 2017, 4:15 AM EST
Location: Aachen, Germany
Posts: 11,641
Thanks: 320
Thanked 3,618 Times in 3,323 Posts
So - did the cron job start and crash, or did it plainly not run?
Sponsored Links
    #7  
Old Unix and Linux 04-01-2013   -   Original Discussion by lovelysethii
lovelysethii lovelysethii is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 7 August 2015, 1:19 AM EDT
Posts: 91
Thanks: 6
Thanked 0 Times in 0 Posts
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
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 04:55 AM
Issue with crontab Sriranga Shell Programming and Scripting 12 06-24-2010 10:19 AM
crontab issue mac4rfree Shell Programming and Scripting 2 06-30-2009 06:51 AM
crontab issue vaddi HP-UX 11 01-28-2008 06:07 AM
crontab issue Semper_Tempus Solaris 6 07-19-2005 11:13 PM



All times are GMT -4. The time now is 05:16 AM.