If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > crontab help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-06, 06:58
kirang kirang is offline
Registered User
 
Join Date: Jul 2005
Posts: 18
crontab help

Hi

I need help on crontab. I just wanted to run a 4gl program in crontab. I work on the unix system. I could able to run the unix commands and a shell program as well. But I couldn't run a 4ge file in crontab. I even tried inserting the 4ge program path in shell program also. But could not get the desired result.

I just did the following :

30 10 * * * /mnt/usr/bb/aa.4ge

If any mistake or suggestion, please do let me know.

Thanks in advance..
Reply With Quote
  #2 (permalink)  
Old 03-27-06, 01:19
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
I don't know 4ge programs but something to note, crontab does not execute your profile so you need to set PATH, LD_LIBRARY_PATH, etc. Create a shell script that will set your environment before starting the program.
e.g. aa.sh
Code:
#!/usr/bin/ksh
. ./.profile       # execute profile (dot space dot/.profile)
/mnt/usr/bb/aa.4ge # execute program
Then in cron you execute the script
30 10 * * * /mnt/usr/bb/aa.sh
Reply With Quote
  #3 (permalink)  
Old 03-27-06, 23:56
kirang kirang is offline
Registered User
 
Join Date: Jul 2005
Posts: 18
Mr. Pdreyer,

Thank you very much for your reply. I tried it and worked. U have really helped me a lot. Thank you again...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On