Domanda

I want to make a monthly scheduled task to run a webpage and save the output. As of now, this webpage is in asp and when it opens, it automatically prompts to save/open the output in excel.

Currently I'm trying (using cmd prompt):

schtasks /create /tn MonthlySave /sc MONTHLY /mo LASTDAY /tr "\"C:\Program Files\Mozilla Firefox\firefox.exe\" \"URL.I.Want.To.Save.asp\""

I am running Windows XP

È stato utile?

Soluzione

I found a useful tool called GRABURL.EXE (http://toolground.com/files/GRABURL.EXE) that can output a webpage to a file liek so:

GRABURL.EXE "http://website.com">"C:\Folder\File.xls"

Of course you can change URL as well as Destination Folder/File/Filetype.

This way I could make a BATCH file (called run.bat) to grab the date and save the website I wanted to and then call that BATCH file when scheduling my tasks:

schtasks /CREATE /TN TaskName /TR "C:\run.bat" /SC MONTHLY /MO LASTDAY /M * /ST 02:00:00

For help on the parameters of schtasks, see here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx?mfr=true

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top