HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell script
Operating System - HP-UX
1831320
Members
3042
Online
110023
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
Go to solution
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
08-06-2002 07:17 AM
08-06-2002 07:17 AM
One of my users wants to have 2 cron jobs
running at the same time. She wants to
start a third cron job after both are complete.
How can I make it so the third job will begin
after there is a confirmation that the first
two jobs have completed.
Thank you
running at the same time. She wants to
start a third cron job after both are complete.
How can I make it so the third job will begin
after there is a confirmation that the first
two jobs have completed.
Thank you
veni, vidi, vmstat
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 07:30 AM
08-06-2002 07:30 AM
Solution
I can think of 3 methods instantly:
I. Start all 3 jobs simultaneously but have the third job loop with a sleep until two files have been written (by jobs 1 & 2). Job 3 then removes these files and starts processing.
2) 1 cronjob that does this:
job1 &
job2 &
wait
start job 3 processing.
The wait command will wait fore all background processes to complete.
C) You could have job2 issue an at command:
e.g. at /usr/local/bin/myfile.sh at now + 5 minutes.
My preference is 2.
I. Start all 3 jobs simultaneously but have the third job loop with a sleep until two files have been written (by jobs 1 & 2). Job 3 then removes these files and starts processing.
2) 1 cronjob that does this:
job1 &
job2 &
wait
start job 3 processing.
The wait command will wait fore all background processes to complete.
C) You could have job2 issue an at command:
e.g. at /usr/local/bin/myfile.sh at now + 5 minutes.
My preference is 2.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 07:45 AM
08-06-2002 07:45 AM
Re: shell script
I'd like A. Clay Stephenson's second method. It is reliable and does simplify the job controlling (all the three jobs are launched from one cron script.)
Hai
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2002 08:07 AM
08-06-2002 08:07 AM
Re: shell script
Just create a simple script that is started from cron that starts the first two "jobs" then checks the return status of each before launching the third.
live free or die
harry
Live Free or Die
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