jeffreyscottsmith
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?
Anyone have any thoughts?
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"
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
ping 127.0.0.1 -n 30 > nul
Schedule two jobs running the same task - offset them by 30 seconds...
Will that work for you?