Results 1 to 5 of 5

Thread: Background Task in Classic ASP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2011
    Posts
    84

    Background Task in Classic ASP

    I am building a project using Classic ASP (mainly because I already have a lot of stuff written in Classic ASP over the years) on a shared hosted server

    I need a simple way of running something in the background. So, maybe once per minute it looks at the state of the Database and sends appropriate emails to people

    The fact it is on a shared hosted server limits what I can do in practice - any suggestions how I can do this?

    Many thanks
    Bob
    .

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    2,165

    Re: Background Task in Classic ASP

    When I hear Classic ASP, I think "server side code that runs when a user accesses a web page". That setup isn't very conducive to running some sort of scheduled task.

    Does this "something in the background" that you want to run currently exist as an exe file? Or is it just a list of things you need it to do, and you need to write the code to do it?

    If your hosting limitations are such that your asp code isn't able to launch an exe file that exists on the server, or you aren't able to add an actual schedule task on the server that launches an exe file, and you are limited to strictly database interaction from Classic ASP code, then one option (albeit not a fantastic option by any means) would be to write a page that:

    -Is sitting behind some sort of authentication process
    -In the server side asp code, does everything you need it to do as far as database/email stuff
    -Has client side code in place to automatically refresh this page every 60 seconds
    -You keep a web browser open somewhere open to this page and let it just do its thing every minute

    Good luck.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2011
    Posts
    84

    Re: Background Task in Classic ASP

    When I hear Classic ASP, I think "server side code that runs when a user accesses a web page". That setup isn't very conducive to running some sort of scheduled task.

    Agreed!

    Does this "something in the background" that you want to run currently exist as an exe file? Or is it just a list of things you need it to do, and you need to write the code to do it?

    it is just a list of things I need it to do, and I need to write the code to do it

    If your hosting limitations are such that your asp code isn't able to launch an exe file that exists on the server or you aren't able to add an actual schedule task on the server that launches an exe file ...

    I don't know but it is an avenue I can maybe explore - the hosting people are very helpful

    (i) you are limited to strictly database interaction from Classic ASP code, then one option (albeit not a fantastic option by any means) would be to write a page that:

    -Is sitting behind some sort of authentication process
    -In the server side asp code, does everything you need it to do as far as database/email stuff
    -Has client side code in place to automatically refresh this page every 60 seconds
    -You keep a web browser open somewhere open to this page and let it just do its thing every minute


    Yes, I thought of that but it seems a bit crude and looks like something that would stop working every few days when the internet conenction fails or whatever ...

    But many thanks for your help!
    Bob

  4. #4
    PowerPoster
    Join Date
    Nov 2017
    Posts
    2,165

    Re: Background Task in Classic ASP

    Quote Originally Posted by wavering View Post
    Yes, I thought of that but it seems a bit crude and looks like something that would stop working every few days when the internet conenction fails or whatever ...
    Indeed. If I were in your shoes, it would be a "last resort" type of option, just above looking for a new job.

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,984

    Re: Background Task in Classic ASP

    Look into CronJobs ... or see if Windows Scheduler would work ... This isn't work for ASP, but some other service running on the server that's independant to the Web front.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width