Announcing FluentScheduler

Overview

Over the Thanksgiving Holiday, I created an open source project called FluentSchedulerFluentScheduler is a .NET 4 based task scheduler.  It allows you to run tasks/cron jobs from your application.  A fluent api is used to configure schedules for when to run each task.

Why?

In .NET land, I had previously used an xml based task scheduler that only allowed interval based task runtimes.  I wanted more of a .NET 4 way of doing things… With FluentScheduler, not only can you can use a class to represent a task, you can also define your task using a lambda expression.  I really wanted things to be flexible and not try to limit people with how they define their tasks.  Additionally, you can schedule your tasks to run at specific times as well as intervals.

There were many firsts for me with this project:

  • I enjoy using fluent apis, but I have never written one myself.  I figured this project would give me a nice opportunity to dive into creating a fluent interface for a product.  Getting fluent apis right is not easy… I hope you find the api I created to be logical and easy to use.
  • While I have worked on open source projects in the past, it has been a while.  I wanted to explore a different host than Sourceforge, so I chose CodePlex.  There are a lot of other .NET based projects hosted on CodePlex and the site gives project owners options for which source control system you would like to use.  These days, I prefer using Mercurial, which CodePlex offers as an available source control system.  So far, my experience with CodePlex has been excellent.  The tool is easy to use and quick to setup.
  • This is my first official NuGet library.  I have private NuGet packages, but FluentScheduler is part of the official Microsoft feed and available to everyone.

Examples

Detailed usage instructions are available here.  But to give you a taste of how easy this library is to use 🙂

// Schedule a complex task to run immediately and on a monthly interval
Schedule(() =>
	{
		Console.WriteLine("Complex Action Task Starts: " + DateTime.Now);
		Thread.Sleep(1000);
		Console.WriteLine("Complex Action Task Ends: " + DateTime.Now);
	}).ToRunNow().AndEvery(1).Months().OnTheFirst(DayOfWeek.Monday).At(3, 0);

How can I use it?

You can begin using FluentScheduler today by either adding it as a NuGet library package reference or by grabbing the assembly from the project release page.  Once you reference the assembly, please take a look at the documentation for how to configure things.

More Information…

If you’re interested in learning more about the project, check out the project’s homepage.  If you’re interested in contributing, please fork the project and start submitting pull requests 🙂

2 thoughts on “Announcing FluentScheduler

    1. Glad you like it! I don’t have any immediate updates at the moment. It serves its purpose for me and until I need more from it or get a pull request, then I likely won’t update it. Yep, you can run multiple tasks concurrently – it’s up to how you configure your task execution in your task registry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.