- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Crontab Issue
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
Forums
Discussions
Discussions
Discussions
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
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
04-01-2008 02:54 AM
04-01-2008 02:54 AM
Crontab Issue
Able to run custom script manually. But when scheduled through crontab it triggers the script but does not execute part of the script.
Scheduled crontab entry:
00,10,20,30,40,50 * * * * /usr/symology/syst/menus/runedis.scr
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 02:57 AM
04-01-2008 02:57 AM
Re: Crontab Issue
Did you setup the PATH environment in your script?
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 02:57 AM
04-01-2008 02:57 AM
Re: Crontab Issue
the environment which user and cron uses are totally different. Cron uses a limited environment unless explicitly specified. Please put all the environment variables in the script or initialize the environment before the command itself. you may also try sourcing .profile of the user before the script.
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 03:04 AM
04-01-2008 03:04 AM
Re: Crontab Issue
Yes we have setup the PATH variables correctly as part of the runediu.scr script.
Anshu,
We have exported all the required environment variables before the actual script gets triggered. How do we shource hte .profile in the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 03:11 AM
04-01-2008 03:11 AM
Re: Crontab Issue
As only one part is not getting executed, can we log the O/P into some file with set -x enabled inside script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 04:17 AM
04-01-2008 04:17 AM
Re: Crontab Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 05:25 AM
04-01-2008 05:25 AM
Re: Crontab Issue
00,10,20,30,40,50 * * * * /usr/symology/syst/menus/runedis.scr 1>/tmp/log 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 06:43 AM
04-01-2008 06:43 AM
Re: Crontab Issue
Remember, the 'cron' environment is devoid of environmental variables declared in your '.profile' since it is not a login that reads your profile. Your default environment consists only of HOME, SHELL, LOGNAME and PATH and the PATH only contains '/usr/bin:/usr/sbin:.'.
A few things you can try are:
1- Try stopping/starting cron if you have not done so-
"/sbin/init.d/cron stop/start"
2- check cron log if it tells you anything
/var/adm/cron/log
3- can you attach you script for forum to test in our environment and see if we get the same result U get?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2008 11:18 PM
04-10-2008 11:18 PM
Re: Crontab Issue
we have tried adding .profile in our start up script and also added one more library path to one of the library variables we are exporting. That solved the problem.
Thanks once again for all your suggestions.