LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-11-2007, 01:56 PM   #1
Itsik Harel
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Specific Crontab Job is not executed .


Hello

A specific Cron job is not executed (The bold one), i checked the /var/log/cron log file and i see an entry for this job at exactly 23:00 ... but i dont see the expected output produced as if this script was not executed ...
needless to say that all the other cron jobs run perfectly
also the script it self works 100% just not via cron .


My Cron :
######################################
# Node2 / Rac2 Cron list #############
######################################
## Remove old archives 4 days old ####
00 06 * * * /ora_data/Scripts/rm_arc/rm_arc.sh 1> /ora_data/Scripts/rm_arc/rm_arc.log
######################################
## Rename Alert\Listener log file ####
00 20 * * 0,4 /ora_data/Scripts/alert_log/rename_alert.sh
00 21 * * 0,4 /ora_data/Scripts/alert_log/rename_listener.sh
######################################
## Export Full DB/Remove older files #
00 23 * * 1,3,5 /ora_data/Scripts/exp/expdp_rac2.sh
######################################
## Backup the Voting and Ocr files ###
01 19 * * * /ora_data/Scripts/crs/crs.sh


vi /ora_data/Scripts/exp/expdp_rac2.sh:

#!/bin/bash

# This Script use data pump export to export the entire rac db.

# ENV
DATE=`date +%F`

# Remove export files older then 7 days.
find /app/exp_dir_rac1/ -ctime +7 -exec rm -f {} \;

# Full Export of The Rac .
/app/oracle/bin/expdp system/oracle@rac1 full=y dumpfile=full.dmp.$DATE logfile=full.log.$DATE PARALLEL=2 directory=EXP_DIR_RAC1


Many Thanks
Itsik
 
Old 03-11-2007, 09:11 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
The only two things I can think of are these:
  1. I don't think there are any environment variables available to you for execution of a cron job. To see whether this is your problem, empty out all your variables at the command line (so there are no environment variables any more, none at all) and run the script to see what happens.
  2. One of those environment variables which is probably not available is PATH. This means that you need to expand the date and find commands to their full pathnames.

Hope this helps.

Last edited by wjevans_7d1@yahoo.co; 03-12-2007 at 04:53 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab job and run on shell sunhui Linux - Software 1 02-13-2007 05:35 AM
crontab job Thulemanden Linux - Software 2 07-09-2006 06:57 AM
skip the crontab job for one time ust Linux - General 2 04-20-2005 03:01 AM
crontab job entry notolerance Linux - Software 2 02-20-2005 02:40 PM
Can I get a konsole to start from a crontab job? davee Linux - Newbie 2 03-05-2004 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration