- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron settings
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
07-04-2005 12:57 PM
07-04-2005 12:57 PM
cron settings
I want to submit scripts by cron and make it run automatically. I check cron log , there is no error, but the script doesn't run. I don't why. below is the log
> CMD: /opt/mfgpro/eB2/localsp7/bin/daily2.batch 1> /tmp/cron/eb2.log 2>>&1
> mfg 4167 c Tue Jul 5 08:35:00 EAT 2005
< mfg 4167 c Tue Jul 5 08:35:00 EAT 2005 rc=2
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 01:13 PM
07-04-2005 01:13 PM
Re: cron settings
/opt/mfgpro/eB2/localsp7/bin/daily2.batch 1> /tmp/cron/eb2.log 2>>&1
to
/opt/mfgpro/eB2/localsp7/bin/daily2.batch 1> /tmp/cron/eb2.log 2>&1
(only one greater than sign)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 01:17 PM
07-04-2005 01:17 PM
Re: cron settings
I see from the cron command line above, output from your cron job is redirected to /tmp/cron/eb2.log file. Check this file for any errors.
Sudeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 03:50 PM
07-04-2005 03:50 PM
Re: cron settings
Make sure any other application is not using the file in which you are redirecting the output. If this happens your cron will stop.
You can check this by fuser.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 06:46 PM
07-04-2005 06:46 PM
Re: cron settings
The PATH environment variable is only containing "/usr/bin:/usr/sbin:." when run from cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 11:31 PM
07-05-2005 11:31 PM
Re: cron settings
< mfg 4167 c Tue Jul 5 08:35:00 EAT 2005 rc=2 <--- rc = return code, 2 means the cron job failed. 0 would indicate it's successful.
Run your script outside of cron, if it is not successful, there is a script problem. If it is successful, but within cron it fails, it means that your script is lacking some environment variable.
Cron runs in a pseudo environment:
When you login, the .profile and /etc/profile are sourced which sets the necessary environment variables.
In cron these are not set because there is no associated login so you must set any required variables within the script itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 11:34 PM
07-05-2005 11:34 PM
Re: cron settings
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2005 11:17 PM
07-06-2005 11:17 PM
Re: cron settings
Let me try to isolate the problem.
1. check whether the cron daemon is running or not.
2. Just tell whether any other scripts are there along with this script.
3. if so do they run properly
4. If this is the only script in cron, please try to run a sample script and check whether it is running properly or not.
25 22 * * * touch /ABCDEF
if the above file is not created, please let me know.
Regards,
Ravi.