Set up a Cron job in Windows to run an ASP script
June 23, 2010
Tutorials | ASP | IIS Management | Internet Explorer | Web Building

If you are used to Linux environments, and working on a web application which needs to execute a function at regular intervals, you'd use a cron job. On Windows, you'd use a scheduled task instead. There is one part of the process that isn't obvious, so here are the steps involved:

  1. Create the web page that executes the desired tasks - sending email, creating files, etc. For example, I have some ASP scripts that create RSS and iCal feeds from a proprietary database, that need to run daily. Record the URL for later.
  2. You will also need a domain account that can run the task, or a server account that can be used in perpetuity to run these types of tasks. I usually have a "fake" account that will never expire created for this type of thing.

  3. Ads by Google

    Posted by ellen at June 23, 2010 05:56 PM

  4. Select Start > Control Panels > Scheduled Tasks > Add a Scheduled Task

    You can also get there through:

    Start > Programs > Accessories > Scheduled Tasks > Add a Scheduled Task


  5. Click Next to start the wizard.


  6. Pick Internet Explorer from the applications list.


  7. Give the task a unique, descriptive name.


  8. Specify the times the task should run.


  9. Check Open advanced properties for this task when I click finish.


  10. In the Run field, after the path to Internet Explorer which will be filled in for you, type a space, followed by the URL of the webpage you created earlier. This should be a WEB path, not a FILE path.


  11. Enter the username and password for the domain account, then hit Next. It will show you a summary of your choices. Click Finish to complete the setup.2010-06-28_16.26.29.jpg

  12. Ads by Google

Ads by Google

 RSS   |   Contact Me

Ads by Google