agausachs / Hangfire.MissionControl

A plugin for Hangfire that enables you to launch jobs manually.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hangfire.MissionControl

NuGet dashboard

A plugin for Hangfire that enables you to launch jobs manually.

Read about hangfire here: https://github.com/HangfireIO/Hangfire#hangfire- and here: http://hangfire.io/

Instructions

  • Install NuGet package
  • Decorate your code with attributes (all parameters are optional)
[MissionLauncher(CategoryName = "Emails")]
public class EmailSenderMissions
{
    [Mission(Name = "Send email", 
        Description = "Send email to customer", 
        Queue = "emails")]
    public string SendEmail(int customerId, string displayName) => //...code;
}
  • Setup dashboard code
// If you use ASP .NET Core
services.AddHangfire(configuration => configuration.UseMissionControl(typeof(EmailSenderMissions).Assembly));

// If you use console application
GlobalConfiguration.Configuration.UseMissionControl(typeof(EmailSenderMissions).Assembly);

License

Authored by: Viktor Svyatokha (ahydrax)

This project is under MIT license. You can obtain the license copy here.

About

A plugin for Hangfire that enables you to launch jobs manually.

License:MIT License


Languages

Language:C# 88.7%Language:HTML 7.2%Language:JavaScript 3.1%Language:CSS 0.9%