Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open URL via cmd without opening a browser

I wanted to use my local server which is running Windows 7 to take advantage of the task scheduler to setup some cron jobs for some of my php files.

I can do this currently by: start http://theurl

Which opens in my default browser. However I was hoping to accomplish this without physically opening a browser so when I come back to my computer after a few days I don't have millions of Chrome windows open.

How can I load a URL in Task scheduler without opening a browser client via cmd?

like image 955
Nick Avatar asked Feb 20 '23 18:02

Nick


1 Answers

I was able to accomplish the cron job by using a program called wget. I setup task scheduler to run the wget.exe at my specified time with these arguments:

   wget -q -O - http://theurl.com > tmp.txt

This would load the website and store it to a temporary text file which is overwritten next time it is used.

like image 156
Nick Avatar answered Feb 27 '23 04:02

Nick