What is the equivalent to cron jobs in ASP.NET?

Farooq Ahmed Khan picture Farooq Ahmed Khan · Nov 22, 2011 · Viewed 56.9k times · Source

In PHP we have cron jobs, where the hosting server automatically picks up and executes a task as per the schedule given.

What would be a good alternative to use for CRON jobs in ASP.NET? I'd like to use a Web service, but that will not work in a shared hosting environment. Any help would be appreciated, and please advise a way to do this specifically in a shared hosting environment.

Answer

Johannes Kommer picture Johannes Kommer · Nov 22, 2011

Try Quartz.NET. It's a decent .NET scheduler which supports CRON expressions, CRON triggers and various other means and methods to schedule tasks to be performed at certain times / intervals.

It even includes a basic Quartz.NET server (Windows Application) that might fit your needs.

Edit:

If you can't run applications or windows services within your shared hosting then perhaps something like "Easy Background Tasks in ASP.NET" will do you? It simulates a Windows Service using HttpRuntime.Cache and removes the need for any external dependancies.