Visit Our UNIX and Linux User Community

Issue with cron job

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Issue with cron job
# 1  
Old 11-21-2005
Issue with cron job


I have a script which I am able to run from command line. When I put this in cron, it fails and gives the following message: /d00/documentum/product/5.2.5/bin/dmbasic: fatal: open failed: No such file or directory

The ksh script looks like this:

# Set this variable during installation


# Get the date for recording in the logfile
date +"%m/%d/%Y %T" | read current_date

# If there are no arguments call the render_objects.bas and enter the correct
# function.
if [[ $# -eq 0 ]]

echo "\nExecuting render_objects at $current_date" >> $LOGFILE
$DM_BIN/dmbasic -f $EXECDIR/render_objects.bas $EXECDIR/StringUtils.bas -e EntryPoint -p $DOCBASE $DOCBASEOWNER >> $LOGFILE

elif [[ $# -eq 1 ]]
echo "\nExecuting render_objects for one Object ID: $1 at $current_date" >> $LOGFILE
$DM_BIN/dmbasic -f $EXECDIR/render_objects.bas $EXECDIR/StringUtils.bas -e EntryPointOneItem -p $DOCBASE $DOCUMENTUMOWNER $1 >> $LOGFILE

echo "Usage: render_objects.ksh [object_id]" >> $LOGFILE
exit 1

# Exit Status
exit $?

Any ideas/suggestions.

# 2  
Old 11-21-2005
You have an environment variable in your command-line shell. Do this:

That is where dmbasic is getting its function from... somewhere in the LIBRARY_PATH.

In your shell script above then, you would put:

Put that right after the #!/bin/ksh line... or anywhere near the beginning of your script.

Previous Thread | Next Thread
Test Your Knowledge in Computers #54
Difficulty: Easy
COBOL stands for 'Common Business Oriented Language'.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cron Job Issue

My Friends I want to run a script only at the end of month.but i tried below cront entry its not working. pls help 0 9 28-31 ] && /usr/bin/bash /u01/app/scripts/CX-eom.shOs Details: AIX Please use CODE tags as required by forum rules! (5 Replies)
Discussion started by: ded325
5 Replies

2. UNIX for Beginners Questions & Answers

Cron Job Issue

Dear Members Seeking you help on my issue. this script need to run on every end of month.i configured as below. but it runs everyday. why 0 9 28-31 * * ] && /usr/bin/bash /u01///scripts/ (3 Replies)
Discussion started by: ded325
3 Replies

3. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

4. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

5. Shell Programming and Scripting

Issue with svn update using cron job.

I want to update svn code using a nightly job using cron, i have created a job in cron as, 30 17-19 * * 1-5 /home/saprab/ <branch> <svnusername> <svnpassword> >> <logfile> 2>&1 : =============== #!/bin/bash branch=$1 svnuser=$2 svnpass=$3 cd ${branch}... (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies

6. Shell Programming and Scripting

cron job issue

Hi , I want to run script every minute so i added . cron entry as below usning crontab -e looks like */1 * * * * sh /home/sai/http_sim/ but cron job is not running ? any way to start the cron or something ? Thanks, Raghavendra (2 Replies)
Discussion started by: raghavendra.nsn
2 Replies

7. Shell Programming and Scripting

cron job issue..i hav read the basic threads already...

hi friends well m facing a different sort of issue in my cron. i hav set job like this 30 09 * * 1 /bin/backup14M 01 14 * * 1 /bin/backup14N 20 18 * * 1 /bin/backup14E that is for every Monday at three different times. but, first job executes well, later ones do not. I checked my... (13 Replies)
Discussion started by: oracle.test2
13 Replies

8. UNIX for Dummies Questions & Answers

Cron job issue

This is regarding my cron job. My cron entry 30 * * * 1-5,0 /work1/informix/sample/ 31 * * * 1-5,0 /work1/informix/sample/ Every 30 mins is run. (mon thru friday and sunday) Every 30 mins is run. (mon thru friday and sunday) This is based on the... (3 Replies)
Discussion started by: kenkanya
3 Replies

9. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

10. Shell Programming and Scripting

Issue with cron job -Please help

Hi , I have an issue with cron job that i have scheduled today. The problem is that when i run this script in command prompt it work good giving me the desired results but if i schedule this to run using cron job it failes giving a "syntax error in line 11 :$"..... Can anyone look into this and... (6 Replies)
Discussion started by: bsandeep_80
6 Replies

Featured Tech Videos