Below is my batch code
:START
echo RUNNING START
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
ping -n 30 127.0.0.1 > nul
echo RUNNING DONE 30 secs
taskkill /im chrome.exe
echo KILL CHROME
GOTO START
I trying to lets say run google.com every 30 seconds using my window batch file and load it at window cmd prompt by
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd Desktop
C:\Users\Administrator\Desktop>chrome.bat
But problem is on the part where it load line 3
which is
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
The command prompt will stuck and hang, and not execute the next line.
What i want to achieve is
LOOP every 30 seconds, loading a specific page e.g google.com
I not ddosing Google.com or what, I Just actually want setup a simple cron job to load 1 of my page every 30 seconds using google as example in this case
Try to use
start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
instead of
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.google.com
this will start a new processes and let your batch continue. and
taskkill /F /im chrome.exe
It works either cases for me.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments