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:
public class RecurringJobTesting
{
[RecurringJob("*/2 * * * *", "China Standard Time", "default", RecurringJobId = "Check-File-Exists")]
public void CheckFileExists()
{
Console.WriteLine("Check File Exists");
}
}
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");
}
}
Install a package from Nuget.
Install-Package Hangfire.RecurringJobAdmin
Then add this in your code:
for service side:
services.AddHangfire(config => config.UseSqlServerStorage(Configuration.GetConnectionString("HangfireConnection"))
.UseRecurringJobAdmin(typeof(Startup).Assembly))
for startup side:
GlobalConfiguration.Configuration.UseSqlServerStorage("HangfireConnection").UseRecurringJobAdmin(typeof(Startup).Assembly)
Author: bamotav
Source Code: https://github.com/bamotav/Hangfire.RecurringJobAdmin
#vuejs #vue #javascript