Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an .sh script. I would like to wait 25 minutes and then continue running, NOT repeat.
It's something like this:

#!/bin/bash
/bin/bash ~/path/script.sh

I want it to kill a process after waiting 25 minutes.

#Wait 25 minutes
killall process
share|improve this question

2 Answers 2

up vote 3 down vote accepted

Use the sleep command: sleep 25m

So it would look like

sleep 25m
killall process

Source and good resource: http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/

share|improve this answer

Try: sleep 25m

This should make the script sleep for 25 minutes and then continuing executing after

For sleeping in second try: sleep 25

This will make it sleep for 25 seconds

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.