Call an asp page without opening a web Browser.
am 11.07.2007 09:22:13 von Miguel
Hello,
I need to call an asp twice a day and I want to do it with an
scheduled task. The matter is that I want no Internet explorer window
to be opened. I do not need to see anything in the page. This ASP page
just executes an DB actualization, so it just have to be run.
Do you know how can I call the page without calling:
iexplore.exe http://www.mydomain.com/mypage.asp
because it opens a Web browser.
Thank you for your help.
Miguel Angel.
Re: Call an asp page without opening a web Browser.
am 11.07.2007 10:00:04 von exjxw.hannivoort
Miguel wrote on 11 jul 2007 in microsoft.public.inetserver.asp.general:
> I need to call an asp twice a day and I want to do it with an
> scheduled task. The matter is that I want no Internet explorer window
> to be opened. I do not need to see anything in the page. This ASP page
> just executes an DB actualization, so it just have to be run.
>
> Do you know how can I call the page without calling:
>
> iexplore.exe http://www.mydomain.com/mypage.asp
>
> because it opens a Web browser.
=========== TwiceADay.js ============
var http = new ActiveXObject("Msxml2.XMLHTTP");
http.open('GET','http://www.mydomain.com/mypage.asp',false);
http.send();
WScript.Echo('Done !'); // this line is not needed finally
======================================
and call it like this:
wscript TwiceADay.js
[not extensively tested]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Call an asp page without opening a web Browser.
am 11.07.2007 17:43:26 von Dave Anderson
Miguel wrote:
> ...This ASP page just executes an DB actualization, so it
> just have to be run.
>
> Do you know how can I call the page without calling:
You can use cscript.exe to launch a .js or .vbs script. Take a look at the
[Run from command prompt] option here):
http://msdn2.microsoft.com/en-us/library/9bh01k1z.aspx
In your script, use one of the XMLHTTP request objects:
http://support.microsoft.com/kb/290591
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.