- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Crontab and Connect Direct Compatability
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
тАО08-27-2004 12:07 AM
тАО08-27-2004 12:07 AM
a shell script.
the Connect direct utility for the same lies in /opt/cdunix/ndm/bin/ directory.
When i try running the shell script from crontab i get the following error
"Failed to read configuration file, exiting".
But i am able to run the same from from any other directory.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 12:15 AM
тАО08-27-2004 12:15 AM
Re: Crontab and Connect Direct Compatability
I think you have the same problem, like I had.
When you run your script from command line, you have some enviroment (command env), but when you run from contab, there is not the same enviroment. Expecially you need PATH maybe other variables.
Try what you need, what you have in your profile, it is not used in environment during running in crontab.
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:05 AM
тАО08-27-2004 01:05 AM
Re: Crontab and Connect Direct Compatability
I have hardcoded the path in the script.
But the problem is crontab works from /bin/ksh directory and connect direct from /opt/cdunix/ndm/bin/ directory.
Is there any way i can run this script from crontab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:13 AM
тАО08-27-2004 01:13 AM
Re: Crontab and Connect Direct Compatability
first - you can initiate variables by adding line to crontab
(example...
for my oracle crontab at the begining I add
PATH="/u01/app/oracle/product/10.1.0/db_1/bin")
second - you can use in the script at first line !#/bin/ksh
third - it looks like the script cannot find conf. file where it is placed?
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:54 AM
тАО08-27-2004 01:54 AM
Re: Crontab and Connect Direct Compatability
My crontab entry is this:
45 00 * * * SVC_HOME=${HOME} ${HOME}/scripts/ConDirRep.pl
From within ConDirRep.pl i am calling a shell script which
gets me the Connect Direct status.
Yes, i have included !#/bin/ksh in the shell script
and #!/usr/bin/perl in the perl script.
Both the shell, as well as the perl scripts are in /app/sur/scripts directory.
$HOME = /app/sur/
Regards,
Surekha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2004 08:33 PM
тАО08-29-2004 08:33 PM
Re: Crontab and Connect Direct Compatability
did you solve your problem?
Sorry, but on the Friday I had to go home.
I think everything is OK, but the config ("Failed to read configuration file, exiting".) is on different place then you run your scripts. You should change your pwd to place, where you have your config file or in your script use absolute path to your config file.
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2004 10:01 PM
тАО08-29-2004 10:01 PM
Re: Crontab and Connect Direct Compatability
45 00 * * * SVC_HOME=${HOME} ${HOME}/scripts/ConDirRep.pl
If you want to set environment variable then, try it before configuration line as,
SVC_HOME=${HOME}
45 00 * * * sur ${HOME}/scripts/ConDirRep.pl
where sur is your username.
${HOME} , userinformations are being retrieved from /etc/passwd file. Are you trying from your user.?
If you try it from other users or root then it will try it from their home directory.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2004 12:43 AM
тАО08-30-2004 12:43 AM
Re: Crontab and Connect Direct Compatability
Permissions are 755.
User also has permissions set.
Can you tell me which all directories crontab has access?
Because the directory i am trying to read from is
/opt/cdunix/ndm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2004 03:08 AM
тАО08-30-2004 03:08 AM
SolutionYour crontab entry
45 00 * * * SVC_HOME=${HOME} ${HOME}/scripts/ConDirRep.pl
should be like:
45 00 * * * SVC_HOME=${HOME}; export SVC_HOME; ${HOME}/scripts/ConDirRep.pl
This way SVC_HOME will be exported to the sub processes.
A better way is to write a wrapper around your perl script, that sets all variables.
Maybe even better is to have 1 file containing all variable settings and sourcing this file from a shell script (. .../filename) or perl script (....).
JP.
Did you read http://forums1.itrc.hp.com/service/forums/helptips.do?#28
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2004 02:35 PM
тАО08-30-2004 02:35 PM
Re: Crontab and Connect Direct Compatability
I wrote a wrapper as suggested... and It worked. I set all the required environment parameters out there.
Thanks a lot for you help.
Regards,
Surekha