- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Expect script not running in Crontab
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
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
тАО12-14-2004 03:37 PM
тАО12-14-2004 03:37 PM
Expect script not running in Crontab
Its running fine when i run the shell script manually
but not when in crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 04:18 PM
тАО12-14-2004 04:18 PM
Re: Expect script not running in Crontab
You must remember that when something runs from cron, the environment is VERY VERY sparse. There is little, or no, PATH environment which is the usual cause of problems.
Set ANY and ALL environment variables you need within the script itself. You also should fully qualify ALL programs and commands that you run within the scripts so that you know exactly which ones are running and you have the exact path to them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 05:22 PM
тАО12-14-2004 05:22 PM
Re: Expect script not running in Crontab
env > /tmp/regular.env.txt
from the script running in cron
env > /tmp/cron.env.txt
diff /tmp/cron.env.txt /tmp/regular.env.txt
You will notice a massive difference.
Any variable could cook this process.
Look first at PATH
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 05:30 PM
тАО12-14-2004 05:30 PM
Re: Expect script not running in Crontab
Most probably the environment as mentioned before. You can get more information from the following.
1. Check the mailbox of the user you are running the script as on the box. Login as that user and run 'elm' and look at the mail. Any errors will go to the local mail if not auto forwarded.
2. Redirect the errors to some file and look at the file after the job is run.
For ex., make your crontab as
12 * * * * /your_dir/your_scr >> /tmp/your_scr.out 2>&1
You will get clues from the above.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 06:14 PM
тАО12-14-2004 06:14 PM
Re: Expect script not running in Crontab
I debugged the error..
I used sleep.. after the sleep-expect and
pwd-expect. and at the end i used interact..
I now changed it to ..no sleeps..
and expect eof at end of expect script..
Thanku all once again.
I keep informing u about my problems.. in future