adding delay in script

Hi Expert,
I need to run some command 5 times with 5 mins interval whenever one of the application on server hang.
Can I use below scripts ?
Thanks!

-------------
#!/bin/sh

command1
sleep 300
command2
sleep 300
command3
sleep 300
command4
sleep 300
command5
sleep 300
-----------------

not me :wink:

I need to run some command 5 times with 5 mins interval whenever one of the application on server hang.

When some application hangs without processing - how do you define the state of being 'hung' for an application ? is it not responding any queries or requests ?

You could use a while loop to achieve the same ( search the forum for while loop example )

thanks.