| Author |
Message |
Garry
Joined: 15 Oct 2003
Posts: 14
|
| Posted: Mon Mar 15, 2004 6:27 pm Post subject: pause for X amount of mins before next task |
|
|
Hi,
I am trying to get the code to make script to start some process when our server is booted but they can not be run all at onces, so does anyone know the shell code to hold the next command for X amount of mins before running it ?
Regards,
Garry |
|
| Back to top |
|
caker
Joined: 15 Apr 2003
Posts: 2392
Location: Galloway, NJ
|
| Posted: Mon Mar 15, 2004 6:30 pm Post subject: |
|
|
"sleep 30" will sleep for 30 seconds. Is that what you're looking for?
-Chris |
|
| Back to top |
|
Garry
Joined: 15 Oct 2003
Posts: 14
|
| Posted: Mon Mar 15, 2004 6:32 pm Post subject: |
|
|
I thikn so will give that a try, thank you :)
Regards,
Garry |
|
| Back to top |
|
sednet
Joined: 17 Mar 2004
Posts: 106
Location: Europe
|
| Posted: Wed Mar 17, 2004 3:16 pm Post subject: At / Sleep |
|
|
If you are running atd:
at now + X mins jobname
With sleep:
sleep $(( mins * 60 )) ; jobname
After another process has finished:
wait otherpid ; jobname |
|
| Back to top |
|
sednet
Joined: 17 Mar 2004
Posts: 106
Location: Europe
|
| Posted: Wed Mar 17, 2004 3:17 pm Post subject: RC scripts |
|
|
| Or even better add a RC script with a sequence number higher than the others... |
|
| Back to top |
|
| |