- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cronjob not running even in log showed the act...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2009 11:32 PM
тАО01-13-2009 11:32 PM
Re: Cronjob not running even in log showed the activities
> /home/express/tmp2/BAPIN_APL.out
You also need to redirect stderr by adding: 2>&1
You can also trace your script by adding "set -x" near the top. That way you can find where it is failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 12:55 AM
тАО01-14-2009 12:55 AM
Re: Cronjob not running even in log showed the activities
here the output
Processing /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi
/home/express/BIN/edi_load_post.sh BAPIN_APL /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi
+ + pwd
currentdir=/home/express
+ cd /home/express/INTERFACES/express_host
+ ng ng-stats
+ 1> ngtemp 2>& 1
+ cat ngtemp
+ grep NGServerStats
+ 1> ngtemp1
+ [ ! -s ngtemp1 ]
+ java ExpressEdi -load /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi -post BAPIN_APL
+ 1> /dev/null
/home/express/BIN/edi_load_post.sh[33]: java: not found
+ cd /home/express
and i run manually the command in commandline
bahora1(express)$ /home/express/BIN/sweep2.sh /home/express/EDI/BAPLIE/APL/IN/RECEIVAL /home/express/BIN/edi_load_post.sh BAPIN_APL > /home/express/tmp2/BAPIN_APL.out 2>&1
here the output
Processing /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi
/home/express/BIN/edi_load_post.sh BAPIN_APL /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi
+ + pwd
currentdir=/home/express/tmp2
+ cd /home/express/INTERFACES/express_host
+ ng ng-stats
+ 1> ngtemp 2>& 1
+ cat ngtemp
+ grep NGServerStats
+ 1> ngtemp1
+ [ ! -s ngtemp1 ]
+ java ExpressEdi -load /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi -post BAPIN_APL
+ 1> /dev/null
+ cd /home/express/tmp2
Archiving /home/express/EDI/BAPLIE/APL/IN/RECEIVAL/n0028499.edi
For those two log we can spot the problem below when cronjob generating the task
/home/express/BIN/edi_load_post.sh[33]: java: not found
what's that mean?
Appreciate ur guy expertice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 03:49 AM
тАО01-14-2009 03:49 AM
Re: Cronjob not running even in log showed the activities
This is the reason Elmar suggested adding your normal shell PATH to the top of the cron script. This should allow the script to execute with the same PATH variable that you typically run in your login shell, which will allow the script to find the java program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 05:33 AM
тАО01-14-2009 05:33 AM
Re: Cronjob not running even in log showed the activities
Additionally, you'll likely want to set the SHLIB_PATH and LD_LIBRARY_PATH variables as well. Everything that's automatically set up for your interactive session, say by your /etc/profile, $HOME/.profile, etc., will need to be manually set within each script to be cron'ed.
HP-Server-Literate since 1979
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 06:01 AM
тАО01-14-2009 06:01 AM
Re: Cronjob not running even in log showed the activities
export PATH=$PATH:$ORACLE_HOME/bin:$PATH_DEF:/usr/bin/X11
and i added :/opt/java1.5/bin in the last line and everything back to normal.
Your guys efford are really appreciated.
Will close the thread and submit the point.
Thanks all
AMIR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 06:03 AM
тАО01-14-2009 06:03 AM
Re: Cronjob not running even in log showed the activities
add the following
#!/bin/ksh
and try this.
regards
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 06:03 AM
тАО01-14-2009 06:03 AM
Re: Cronjob not running even in log showed the activities
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2009 01:56 PM
тАО01-14-2009 01:56 PM
Re: Cronjob not running even in log showed the activities
This is always a good idea. But cron tells you that it is going to use /usr/bin/sh to execute each script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2009 07:10 AM
тАО01-15-2009 07:10 AM
Re: Cronjob not running even in log showed the activities
export PATH=$PATH:$ORACLE_HOME/bin:$PATH_DEF:/usr/bin/X11
and i added :/opt/java1.5/bin in the last line and everything back to normal"
unless the script is run specifically using your profile, this has absolutely nothing to do with the problem you experienced. cron will run the job as the user that "owns" the crontab and it will ignore the environment of that user. the script itself is pretty much responsible for setting up the required environment.
- « Previous
- Next »