tag:blogger.com,1999:blog-6718406939865222936.post6420655376235528894..comments2024-03-16T20:51:58.301+01:00Comments on the web thought: VBScript: how to schedule the opening of an ASP pageMarco Del Cornohttp://www.blogger.com/profile/00863522198118005628noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6718406939865222936.post-29802658641617246502012-05-24T13:12:35.224+02:002012-05-24T13:12:35.224+02:00Thanks for sharing it.
The code I posted is workin...Thanks for sharing it.<br />The code I posted is working on Windows 2003 server, Win Xp, Vista and 7. That's where I tested it. The only difference is that I have those machines here next to me (at least for a little while more) and they are not web servers...<br />Anyway thanks again and take care!Marco Del Cornohttps://www.blogger.com/profile/00863522198118005628noreply@blogger.comtag:blogger.com,1999:blog-6718406939865222936.post-15617987019841284232012-05-24T12:31:05.693+02:002012-05-24T12:31:05.693+02:00Hi Marco,
I had still problems to call a *.asp pa...Hi Marco,<br /><br />I had still problems to call a *.asp page with a task scheduler. I am hosting on a Windows 2008 server. Someone did write a vbs script for me that works perfect.<br /><br />- So create a vbs file for example runurl.vbs with the code I written below.<br />- upload it to the webserver<br />- call the script with a task scheduler<br /><br />Call Send_HTTP_Request()<br />Sub Send_HTTP_Request()<br /><br />'Force the script to finish on an error.<br />On Error Resume Next<br /><br />'Declare variables<br />Dim objRequest<br />Dim URL<br />Set objRequest = CreateObject("Microsoft.XMLHTTP")<br /><br />'Put together the URL link appending the Variables.<br />URL = "http://somepage.asp"<br /><br />'Open the HTTP request and pass the URL to the objRequest object<br />objRequest.open "GET", URL , false<br /><br />'Send the HTML Request<br />objRequest.Send<br /><br />'Set the object to nothing<br />Set objRequest = Nothing<br /><br />End SubStill_aspnoreply@blogger.comtag:blogger.com,1999:blog-6718406939865222936.post-39708452987484955342012-04-25T12:14:36.745+02:002012-04-25T12:14:36.745+02:00Yes you're there's a mistake. Now I notice...Yes you're there's a mistake. Now I notice. Let me update it (there's a incorrect variable).Marco Del Cornohttps://www.blogger.com/profile/00863522198118005628noreply@blogger.comtag:blogger.com,1999:blog-6718406939865222936.post-38211040928385545652012-04-25T09:19:15.599+02:002012-04-25T09:19:15.599+02:00Hi Marco,
Thanks for mention me in your posting. ...Hi Marco,<br /><br />Thanks for mention me in your posting. Only the VBscript give an error when execute. Keep up the good work.Still_ASPnoreply@blogger.comtag:blogger.com,1999:blog-6718406939865222936.post-33166450218212068672012-04-25T07:13:22.023+02:002012-04-25T07:13:22.023+02:00Reverson, good idea there. Scheduling task is grea...Reverson, good idea there. Scheduling task is great, especially when your company can't slow down or even stop, even for just a moment. I do a lot of maintenance routines during the night, because it is the only time when I can...Marco Del Cornohttps://www.blogger.com/profile/00863522198118005628noreply@blogger.comtag:blogger.com,1999:blog-6718406939865222936.post-56263353769253637582012-04-25T01:49:58.494+02:002012-04-25T01:49:58.494+02:00I run scheduled tasks like this however we use the...I run scheduled tasks like this however we use them to generate client viewable statistics during the night. We also generate lists of top viewed website profiles and other 'top' things.<br />Basically you set the VBS to write an .asp/.inc file (perhaps late at night, when least traffic) which you then include in your page.<br />It's a great way to keep your pages loading fast without bogging down the database with intensive tasks.<br />Also, if you're including these documents in your pages it's a good idea to write a quick script that checks if the file is available before trying to include it into the page - just in case any errors pop up when the vbs runs.Reversonhttps://www.blogger.com/profile/07233311752738413358noreply@blogger.com