HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron will start multiple instances of shell sc...
Operating System - HP-UX
1833016
Members
2470
Online
110048
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
11-28-2000 07:44 AM
11-28-2000 07:44 AM
cron will start multiple instances of shell scripts within cron
Help!!! HP-UX 10.20 running on K460
We use numerous shell scripts that are running through root's cron. To my horror I noticed cron restarting these scripts even when they are already running. I need them not to restart, if an invokation of that shell script is already running. We are porting code from a Sequoia to HP, Sequoia's Topix OS
will not allow the same script to run out of cron (multiple invokations), HP-UX doesn't care? I find this hard to believe, I'm sure I must be doing something wrong. ANY help is appreciated.
Thanks, Andy
We use numerous shell scripts that are running through root's cron. To my horror I noticed cron restarting these scripts even when they are already running. I need them not to restart, if an invokation of that shell script is already running. We are porting code from a Sequoia to HP, Sequoia's Topix OS
will not allow the same script to run out of cron (multiple invokations), HP-UX doesn't care? I find this hard to believe, I'm sure I must be doing something wrong. ANY help is appreciated.
Thanks, Andy
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 07:59 AM
11-28-2000 07:59 AM
Re: cron will start multiple instances of shell scripts within cron
Hi Andy,
As far as I'm aware, cron doesn't care what is already running.
What I do is to make the script itself ensure that another copy isn't already running.
You can simply count relevant entries from a 'ps' listing or use a more sophisticated locking mechanism.
Regards,
John
As far as I'm aware, cron doesn't care what is already running.
What I do is to make the script itself ensure that another copy isn't already running.
You can simply count relevant entries from a 'ps' listing or use a more sophisticated locking mechanism.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 07:59 AM
11-28-2000 07:59 AM
Re: cron will start multiple instances of shell scripts within cron
Perhaps you can explain what you are trying to accomplish. If you are using cron to ensure that a program/daemon is running (one instance), then simply put some code at the front of your script that checks to see if the process is already running. If the process already exists, exit, otherwise continue and run the process.
I learn something new everyday. (usually because I break something new everyday)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 11:12 PM
11-28-2000 11:12 PM
Re: cron will start multiple instances of shell scripts within cron
Like John said, cron does not care, so perhaps you also need to check the intervals at which one cron job is kicked off before the next invocation. Otherwise Thomas's suggestion is the best.
Also check if there are no "at" jobs invoking the same scripts.
Regards
Ish
Also check if there are no "at" jobs invoking the same scripts.
Regards
Ish
If you keyboard is locked, call a locksmith, not HP!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP