Link to home
Start Free TrialLog in
Avatar of jeffreyscottsmith
jeffreyscottsmithFlag for United States of America

asked on

Schdule bat file for less than 60 seconds

I need a bat file to run over 30 seconds.  With scheduler I can only schedule every 60 secons and soon.exe won't work for me for less than 70 seconds.

Anyone have any thoughts?
Avatar of sirbounty
sirbounty
Flag of United States of America image

every 30 seconds?

Schedule two jobs running the same task - offset them by 30 seconds...
Will that work for you?
like:

schtasks /create /ru system /sc minute /st 09:00:00 /tn Run1 /tr "your task.exe"
schtasks /create /ru system /sc minute /st 09:00:30 /tn Run2 /tr "your task.exe"
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jeffreyscottsmith

ASKER

I am running windows 2000, is there a sleep function for w2k
You can download the sleep function, or you can fudge it using

ping 127.0.0.1 -n 30

which is nearly equivalent to a 30 second delay.
redirect it to null to hide the output

ping 127.0.0.1 -n 30 > nul