Windows Task Scheduler to execute .aspx page using Powershell

asp.netexecutepowershellwebpagewindows

I want to use Windows Task Scheduler to execute my ASP.NET web page (.aspx). I read that Windows Powershell can help in this. The post asp.net script in task scheduler

tells a command "powershell.exe -c (new-object system.net.webclient).downloadstring('http://localhost/myscript.aspx')"
to execute .aspx page. But I'm unable to add this line into Windows Task Scheduler, (I'm using Windows XP)

Best Answer

In the run field of the scheduled task:

powershell.exe -command "(new-object system.net.webclient).downloadstring('http://localhost/myscript.aspx')".

That's it.

enter image description here

Related Topic