MS-DOS commands

raulmonda
raulmonda used Ask the Experts™
on
Hi experts,

I need a batch file which basically has to call an application (my_app.exe) in a loop every 10 minutes.  How can I do that?

Thank you in advance.
Regards,
Raul
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
Hi, you can simulate a 'sleep' with a ping command, basically like this:
echo Start of script
:loop
start <path>\my_app.exe
ping 1.1.1.1 -n 1 -w 600000
goto loop

Open in new window

Author

Commented:
the ping command can accept a variable instead of 600000...something like this

echo Start of script
:loop
start <path>\my_app.exe
Set /a num=(%Random% %%10)+1
ping 1.1.1.1 -n 1 -w %num%
goto loop

Open in new window


Thank you
Raul
Topic Advisor
Most Valuable Expert 2016
Commented:
Yes, you can, no problem :)

Author

Commented:
Thank you. your help is much appreciated.

Regards,
Raul

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial