I am writing a quick-and-dirty in-house ASP.NET application that needs to be able to run a task after a specific period of time. If it was a proper application, I’d probably use a windows service but I don’t really want to bother with the extra complexity of that.
I could put code in the BeginRequest handler to check whether any such tasks are due, but of course nothing would happen if nobody is using the application.
at the moment the best option I can think of is something like ShellExecute("nohup sleep 1000; wget http://server/dummypage.aspx") (if you’ll excuse the mixed windows/unix nomenclature).
Anyone have any bright ideas of an alternative?
Andy
Use the
Cacheand expire it at the required time.The
Insertmethod has overloads that take a callback function, so you can use it as to location for the timed job.