- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron help...
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
01-15-2004 03:10 AM
01-15-2004 03:10 AM
-rwxr-xr-x 1 speclive live 694 Jan 15 10:01 apostdat
All it basically does is update a number in this file:
-rw-rw-r-- 1 speclive live 15 Jan 15 00:32 DPOSTDAT
When I run apostdat script, as root FROM THE COMMAND LINE it works fine and updates DPOSTDAT.
When I add the following entry in cron (through "crontab -e"):
03 10 * * * /var/summit/spectrum/FI1/FI/DATA/apostdat
It doesn't update the file. What is going on here?! /var/adm/cron/cron.allow file includes root.
Does it have to do with the permissions of either the script or the file the script is updating? But I am able to run it successfully as root, so why not through cron as well?
Thanks and the right answer will be fully rewarded:)
-Hazem
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2004 03:13 AM
01-15-2004 03:13 AM
Solutionthe pb might be you must initialize your PATH (and other variables) within your script.
(cron does not run the profile)
The other way around is to have a wrapper script that will initialize all required variables before yu run the specific script.
Rgds,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2004 03:13 AM
01-15-2004 03:13 AM
Re: Cron help...
cron should mail back a message to the user with any errors (i.e. command not found) encountered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2004 03:17 AM
01-15-2004 03:17 AM
Re: Cron help...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2004 03:20 AM
01-15-2004 03:20 AM
Re: Cron help...
In a word: alway use full path names in scripts. You can also set paths within the script but it's just as easy to use the full path name.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2004 03:24 AM
01-15-2004 03:24 AM
Re: Cron help...
This forum is great!
-Hazem