0

Anyone knows if its possible to add a timer do this command? I want to access a certain website in my default browser minutes after typing.

start "" "https://superuser.com/"

This worked but it doesn't have the timer.

Something like the shutdown command, you know:

shutdown -s -t 60

I tried this but didn't work:

start "" "https://superuser.com/" -t 600

Can anyone help me?

1

2 Answers 2

2

A commonly used way of halting a batch file is to use the "ping" command and set it to ping an invalid adress and then wait for the amount of time you choose and then continue in the script. You can see an explanation here

So your script would look like this:

ping 1.1.1.1 -n 1 -w 60000 > nul
start "" "http://superuser.com/"

This will open superuser.com after 1 minute (60000 miliseconds)

Put everything inside and empty text file, save as superuser.bat (important to select "Any filetype" in the save dialouge) and run whenever you want to wait a minute for superuser.com to show up.

0

The command you're looking for is timeout

(timeout 60 /NOBREAK
start "" "http://superuser.com/")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .