asp.net script in task scheduler

心不动则不痛 提交于 2019-12-02 08:26:38

Install PowerShell then you can create a task that runs the following command:

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

I would instead start a background thread in the Application_Start event and then use a timer object to trigger the action every 30 Seconds in this background thread.

save your vbs file,

Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "iexplore your url", 9

WScript.Sleep 20000 ' Give ie some time to load

'Close the browser

WshShell.SendKeys "%F"

WshShell.SendKeys "C"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!