Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
namespace Hangfire.Demo
{
class Program
{
static void Main(string[] args)
{
GlobalConfiguration.Configuration
.UseColouredConsoleLogProvider()
.UseSqlServerStorage("MyHangfireConnection");
using (var server = new BackgroundJobServer())
{
BackgroundJob.Enqueue(() => Console.WriteLine("Hello, world!"));
Console.WriteLine("Hangfire Server started. Press any key to exit...");
Console.ReadKey();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.