Recommend a C# Task Scheduling Library

C#AzureScheduled Tasks

C# Problem Overview


I'm looking for a C# library, preferably open source, that will let me schedule tasks with a fair amount of flexibility. Specifically, I should be able to schedule things to run every N units of time as well as "Every weekday at XXXX time" or "Every Monday at XXXX time". More features than that would be nice, but not necessary. This is something I want to use in an Azure WorkerRole, which immediately rules out Windows Scheduled Tasks, "at", "Cron", and any third party app that requires installation and/or a GUI to operate. I'm looking for a library.

C# Solutions


Solution 1 - C#

http://quartznet.sourceforge.net/

"Quartz.NET is a port of very propular(sic!) open source Java job scheduling framework, Quartz."

PS: Word to the wise, don't try to just navigate to quartz.net when at work ;-)

Solution 2 - C#

I used Quartz back in my Java days and it worked great. I am now using it for some .Net work and it works even better (of course there are a number of years in there for it to have stabalized). So I certainly second the recommendations for it.

Another interesting thing you should look at, that I have just begun to play with is the new System.Threading.Tasks in .Net 4.0. I've just been using the tasks for parallelizing work and it takes great advantage of multi cores/processors. I noticed that there is a class in there named TaskScheduler, I haven't looked at it in detail, but it has methods like QueueTask, DeQueTask, etc. Might be worth some investigation at least.

Solution 3 - C#

Solution 4 - C#

I read about Quartz in this question https://stackoverflow.com/questions/503564/c-service-perform-daily-task. It's a C# library and allows for flexible scheduling.

Solution 5 - C#

Quartz seems like a nice solution.

I've recently (this year) had to write a custom task scheduler on a major project I was working on. They too could not use the Windows Task Scheduler, and also wanted the ability to execute custom functionality by virtue of uploading assemblies (via an ASP.net website) and have the service execute the appropriate task at the specified time.

The thing was honestly a bit of a nightmare (not so much to design and implement, but the scheduling logic was a bit of a drag).

I'd highly recommend exhausting all other avenues before deciding to "roll your own" (a.k.a reinvent the wheel!).

Solution 6 - C#

There is a new cloud based scheduler from Aditi Technologies called Scheduler.

> Scheduler allows developers to schedule the execution of tasks through > HTTP webhooks that run on simple or complex CRON schedules.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionssmithView Question on Stackoverflow
Solution 1 - C#Tiberiu AnaView Answer on Stackoverflow
Solution 2 - C#MikeDView Answer on Stackoverflow
Solution 3 - C#GalwegianView Answer on Stackoverflow
Solution 4 - C#TundeyView Answer on Stackoverflow
Solution 5 - C#RobSView Answer on Stackoverflow
Solution 6 - C#Naveen VijayView Answer on Stackoverflow