Question about wait


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Question about wait
# 1  
Old 11-19-2009
Question about wait

I have a shell script that i want to run and then wait 30 minutes before running the rest of the script.

When I google the "wait" command, it seems to work for waiting for child processes or some pid to stop.

How do I wait for 30 minutes before continuing?
# 2  
Old 11-19-2009
Quote:
sleep Command

Purpose

Suspends execution for an interval.

Syntax

sleep Seconds

Description

The sleep command suspends execution of a process for at least the interval
specified by the Seconds parameter. The amount of time specified in the Seconds
parameter can range from 1 to MAXINT (2,147,483,647) seconds.
Code:
sleep 1800

Jean-Pierre.
# 3  
Old 11-19-2009
Quote:
Originally Posted by aigles
Code:
sleep 1800

Jean-Pierre.
normally you can also write :
Code:
sleep 30 minutes
# or
sleep 3 hours

@guessingo : type
Code:
man sleep

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Linux fork, execv, wait question

Hi All, I have a program for class that needs to do the following: 1. Print the directory entries from the current directory using ncurses 2. Provide a prompt next to each directory entry and allow the user to enter commands that may or may not be about the file 3. Execute those commands in... (1 Reply)
Discussion started by: afulldevnull
1 Replies

2. Shell Programming and Scripting

calling a shell script in background and wait using "wait" in while loop

Hi, I am facing a strange issue, when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed. cat abc.txt | while read -u4 line do #if line contains #... (2 Replies)
Discussion started by: mihirvora16
2 Replies

3. Programming

Newbie question on exec,fork, wait,pipe C

Hello everybody.I want to make clear that i am not going to ask from anybody to build my asignement but i have a big problem. I can't seem to find anywhere ONE good example on C about what i am trying to do:wall:.I think it is simple. All i ask is one example, even a link is fine. So, i want to... (1 Reply)
Discussion started by: Cuervo
1 Replies

4. Shell Programming and Scripting

wait example

Hi Gurus, Some questions regarding wait. I have tried searching in this forum for threads on wait but not completely got what I am looking for. Background: One script (.sh) that starts/calls a reference to an application's executable and submits a batch job to it. Objective is to wait... (2 Replies)
Discussion started by: rsheikh
2 Replies

5. Red Hat

WAIT

Can someone explain what is the status says WAIT on performance monitoring command.. (2 Replies)
Discussion started by: suresh_krish
2 Replies

6. Shell Programming and Scripting

wait command - cat it wait for not-chile process?

Did not use 'wait' yet. How I understand by now the wait works only for child processes, started background. Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?) I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies

7. Shell Programming and Scripting

wait ${!}

In one of the shell script (Where abinitio graph is called), the last line is wait ${!}. What does this wait ${!} mean ??? (2 Replies)
Discussion started by: risshanth
2 Replies

8. UNIX for Dummies Questions & Answers

About wait

Hi everyone I'm novice at Unix programming and I hope to post this thread in the correct place. I have the following doubts: 1 Suppose we have some processes which are B's children process and another process A which has no relation with B and its children. Can A do wait () for a... (5 Replies)
Discussion started by: Puntino
5 Replies

9. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies

10. AIX

Question on High I/O Wait

Hi Group, We have 4 p590 with AIX 5.2 and ML06. The servers are connected to the external SAN (hitachi drives). When running the vmstat or topas command, I see that there is a high I/O wait. It sometimes crosses 90% and the average is over 55%. The server is expeiencing high performance... (0 Replies)
Discussion started by: brookingsd
0 Replies
Login or Register to Ask a Question