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

4 Replies

"sleep 30" will sleep for 30 seconds. Is that what you're looking for?

-Chris

I thikn so will give that a try, thank you :)

Regards,

Garry

If you are running atd:

at now + X mins jobname

With sleep:

sleep $(( mins * 60 )) ; jobname

After another process has finished:

wait otherpid ; jobname

Or even better add a RC script with a sequence number higher than the others…

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct