Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web page as a Service

Options
  • 28-09-2004 12:29pm
    #1
    Closed Accounts Posts: 216 ✭✭


    hey,

    I have an ASP page that continually polls a DB to ensure it is running. If it is not running, I receive an email. Pretty simple. However, I was wondering is there any way to set this up as a service that will automatically start up and run in the background.

    Any ideas?

    Cheers


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Probably best to set it up as a Scheduled task.
    Or you could set it up so that the page continually refreshes itself. Easily done with Meta Tags.

    With the scheduled task, you'll need some way of reading the file in a command line, and dumping it into a random text file. Afaik, you can get Lynx for Windows, and if Lynx can read a web page, dump it, and exit automatically.
    So you set a scheduled task to run every x minutes, and the command would be
    lynx http://localhost/mypage.asp > dump.txt

    If you set it up with meta tags, you just need the machine to open the browser on startup, and the page will continually refresh itself. The main drawback with this is unreliability. It's quite likely that at some point, something will go wrong, and you'll get a 404 error or "this page cannot be displayed". At that point, the page won't refresh again, and it won't be working.

    At least with the scheduled task, if something goes wrong on one poll, it'll still try again every x minutes.


  • Closed Accounts Posts: 7,488 ✭✭✭SantaHoe


    seamus wrote:
    It's quite likely that at some point, something will go wrong, and you'll get a 404 error or "this page cannot be displayed". At that point, the page won't refresh again, and it won't be working.
    Hmmm, couldn't this be worked around by setting the meta refresh to reload the content to inside a sub-frame? ... keep the parent html file on a local drive and load that initially instead of the url.
    Haven't tried it, but I just thought I'd throw it out there.


Advertisement