Skip to content
A simple dashboard to manage Hangfire's recurring jobs.
C# HTML CSS JavaScript
Branch: master
Clone or download
bamotav Update README.md
Add badge HangFire site
Latest commit 8062916 Sep 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Content Addec image to content Sep 16, 2019
samples/Hangfire.Sample Refactoring names Sep 24, 2019
src/Hangfire.RecurringJobAdmin Add Validation to attribute Sep 24, 2019
.dockerignore Initial project Sep 12, 2019
.gitattributes Initial project Sep 12, 2019
.gitignore Initial project Sep 12, 2019
Hangfire.RecurringJobAdmin.sln rename folder project sample Sep 17, 2019
LICENSE Added LICENSE Sep 16, 2019
README.md Update README.md Sep 25, 2019
appveyor.yml Fix yml Sep 17, 2019

README.md

Hangfire.RecurringJobAdmin

NuGet Build status Official Site License MIT

dashboard

A simple dashboard to manage Hangfire's recurring jobs.

This repo is an extension for Hangfire based on "Hangfire.Recurring Job Extensions" package made by vigoss, thanks for your contribution to the community. It contains the following functionalities:

  • We can use RecurringJobAttribute stored in database and presented in the administrator.
public class RecurringJobTesting
{
    [RecurringJob("*/2 * * * *", "China Standard Time", "default", RecurringJobId = "Check-File-Exists")]
    public void CheckFileExists()
    {
       Console.WriteLine("Check File Exists");
    }
}
  • We can use DisableConcurrentlyJobExecution, this attribute allows you to not execute a task if it is already running.
public class RecurringJobTesting
{
    [DisableConcurrentlyJobExecution("CheckFileExists")]
    public void CheckFileExists()
    {
       Console.WriteLine("Check File Exists");
    }
    
    [DisableConcurrentlyJobExecution("ValidateProcess", 0, 10, "It is not allowed to perform multiple same tasks.")]
    [RecurringJob("*/2 * * * *", "China Standard Time", "default", RecurringJobId = "Validate-Process")]
    public void ValidateProcess()
    {
        Console.WriteLine("Validate Process");
    }
}
  • We can create, edit jobs.

Instructions

Install a package from Nuget.

Install-Package Hangfire.RecurringJobAdmin

Then add this in your code:

For DotNetCore :

for service side:

services.AddHangfire(config => config.UseSqlServerStorage(Configuration.GetConnectionString("HangfireConnection"))
                                                 .UseRecurringJobAdmin(typeof(Startup).Assembly))

For NetFramework :

for startup side:

GlobalConfiguration.Configuration.UseSqlServerStorage("HangfireConnection").UseRecurringJobAdmin(typeof(Startup).Assembly)

Credits

  • Braulio Alvarez

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

License

Authored by: Brayan Mota (bamotav)

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

You can’t perform that action at this time.