Call an asp page without opening a web Browser.

Discussion in 'ASP General' started by Miguel, Jul 11, 2007.

  1. Miguel

    Miguel Guest

    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.
     
    Miguel, Jul 11, 2007
    #1
    1. Advertising

  2. Miguel

    Evertjan. Guest

    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)
     
    Evertjan., Jul 11, 2007
    #2
    1. Advertising

  3. 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.
     
    Dave Anderson, Jul 11, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sumaira Ahmad

    Opening a Page in a New browser

    Sumaira Ahmad, Nov 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    500
    Kevin Spencer
    Nov 4, 2004
  2. UJ
    Replies:
    2
    Views:
    7,595
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  3. Uriah Piddle

    Opening new browser window without toolbars

    Uriah Piddle, Nov 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    691
    Uriah Piddle
    Nov 10, 2006
  4. Bundy
    Replies:
    17
    Views:
    592
    Blinky the Shark
    Dec 24, 2006
  5. Ken Fine
    Replies:
    2
    Views:
    449
    Ken Fine
    Oct 26, 2004
Loading...

Share This Page