![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can we edit crontab using a shell script | rudrarajumk | Shell Programming and Scripting | 6 | 06-16-2009 08:45 AM |
| crontab entry modification using shell script | munishdh | Shell Programming and Scripting | 4 | 07-01-2007 05:47 AM |
| How to remove line from crontab in shell script? | nir_s | Shell Programming and Scripting | 2 | 11-03-2005 01:19 PM |
| Shell script doesn't get executed using crontab | radhika | Shell Programming and Scripting | 11 | 06-09-2005 04:28 PM |
| root executes a script as another user | tads98 | Shell Programming and Scripting | 1 | 05-17-2005 08:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
crontab and shell script that executes a sql.
Problem:
I have a crontab and when it kicks off, xxx.sh shell script is called. Which has a nohup sqlplus session call. Problem is sql does not get executed and a text file is not getting created. Only a empty log file is getting created. Are there any constraints for crontab to open a sql plus session? Why is the sql not spooling the data? If I execute this shell script on command line every thing works nicely. I have a crontab that is calling a shell script: 28 14 * * 1-5 $HOME/xxx.sh >> $HOME/xxx.log code in xxx.sh: nohup sqlplus userid/password@host @${SCRIPTSD}/xxx.sql ${OUTPUTD}/outfile.txt $datamonth > ${SCRIPTSD}/xxx.log & wait exit 0 Only the xxx.log file is getting created. No data file is getting created! Does anybody know what's the problem. ThankYou, Radhika. |
|
|||||
|
Radhika, please read the FAQs and search before posting.
This is most likely because the environment is not set up to run the commands in your script from cron. the user in this thread had the same problem. This tread was a direct link from the cron and crontab faq. |
|
||||
|
It worked! I was sourcing the wrong profile file- the one with application variables and not the generic one with environment set up information. I guess it IS! time to call it a day.
ThankYou! all for your suggestions. Radhika. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|