Take the 2-minute tour ×

I'm writing a website that will be hosted on a shared hosting environment. As a consequence, I won't have any access to things such as the task scheduler. The website needs to perform various checks on a half-daily basis. What is the best way of firing these tasks in this scenario?

The best two things I could think of where:

  • Fire the process every time a user hits my site - perform some sort of check to see when the process last ran, and if it's greater then 12 hours run the process.
  • Have some hidden page that runs the processes and then get some external entity to ping this page at 12 hour intervals.

Both methods seem a bit ropey?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

you can use a little trick that uses the asp.net cache.

share|improve this answer
add comment

Definitely don't use your option #2, unless you have some kind of protection against running it accidentally.

You also don't want your processing to depend on user requests. What happens if you have a very slow day (say a holiday combined with a large fiber cut somewhere) and no one hits the site for a while?

share|improve this answer
Sure, both options are kinda rubbish. Kopps link seems like a nice approch. –  Dan Apr 17 '09 at 21:24
add comment

Your Answer


