- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Run the process
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
12-13-2005 04:39 PM
12-13-2005 04:39 PM
Run the process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 04:50 PM
12-13-2005 04:50 PM
Re: Run the process
Following code will do that.
job_status=$(UNIX95= ps -C"process_name"|wc -l)
if [[ ${job_status} -gt 0 ]]
then
"start_your_job"
else
exit #not starting the job
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 05:44 PM
12-13-2005 05:44 PM
Re: Run the process
Start a process and check for process completion with it's PID using ps command. Start again once it is completed.
./process &
pid=$!;
check with this $pid variable using while loop.
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 05:50 PM
12-13-2005 05:50 PM
Re: Run the process
there is also the possibility to use the script itself to reschedule itself using the "at" command. See man at
e.g.
echo "$util/yourscript.sh"|at `<
/dev/null
so that it gives something like:
echo "$util/yourscript.sh"|at 8:00am > /dev/null
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 07:04 PM
12-13-2005 07:04 PM
Re: Run the process
What about an inittab(4) entry for this?
Then init(1) will observe that process and respawn a new one when the old one termiates.
rgds
HGH