create delay loop in ruby?

X

Xx Xx

i am trying to run an executable file(say a.exe) which will produce a
a.log once finish.so i create the algo below to analyze the log file.

if(a.exe exist)
execute a.exe

if(a.log exist)
analyze a.log
end
end

but, my thinking is the checking for a.log exist will be done way before
the a.exe is finished.

any workaround for my problem? i was thinking of using a delay(if can)
though it is not so reliable....
 
R

Robert Klemme

2008/12/18 Xx Xx said:
i am trying to run an executable file(say a.exe) which will produce a
a.log once finish.so i create the algo below to analyze the log file.

if(a.exe exist)
execute a.exe

if(a.log exist)
analyze a.log
end
end

but, my thinking is the checking for a.log exist will be done way before
the a.exe is finished.

any workaround for my problem? i was thinking of using a delay(if can)
though it is not so reliable....

Just invoke the process synchronously, e.g. via "system".

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top