0

I want to execute a .bat file 5 minutes after windows starts up. Unfortunately, windows task scheduler doesn't offer anything of the sort, only execute something right on start up. However, I need something to be 5 minutes after startup.

.bat file doesn't do much, just calls one separate .cmd file and passes a parameter. I've tried:

timeout /t 300 /nobreak
"C:\Documents and Settings\Administrator\Desktop\sikuli\runIDE.cmd" -r "C:\Documents and Settings\Administrator\Desktop\sikuli\SikuliXmlTestRunner.sikuli"

However, the runIDE.cmd gets called right away, regardless of the timeout.

Mefhisto1
  • 2,188
  • 7
  • 34
  • 73
  • `schtasks /create /?` lists a `/delay` parameter. Also in the GUI with [Trigger] there is a delay-option. – Stephan Jul 28 '15 at 06:50
  • @Stephan, I think XP doesn't have it. – wOxxOm Jul 28 '15 at 06:53
  • possible duplicate of [How to sleep for 5 seconds in Windows's Command Prompt? (or DOS)](http://stackoverflow.com/questions/1672338/how-to-sleep-for-5-seconds-in-windowss-command-prompt-or-dos) – wOxxOm Jul 28 '15 at 06:55
  • Do you have `timeout.exe` installed? [It's not generic in Windows XP](http://ss64.com/nt/timeout.html). – JosefZ Jul 28 '15 at 08:00

2 Answers2

2

XP doesn't have timeout command, use ping -n 300 localhost>nul or ping -n 1 -w 300000 localhost>nul.

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
2

You can give wait(300) command at the beginning in your sikuli script to achieve this.

mahinlma
  • 1,208
  • 3
  • 11
  • 24