在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:yuzd/Hangfire.HttpJob开源软件地址:https://github.com/yuzd/Hangfire.HttpJob开源编程语言:C# 74.8%开源软件介绍:Hangfire.HttpJob for .netcoreHangfire.HttpJob for Hangfire
wiki00.QickStart DockerQuickStart 01.how to create backgroud httpjob 02.how to create recurringHttpJob 03.how to use HttpJob.Agent 04.how to use in sqlserver 05.how to config mail service to report job result https://github.com/yuzd/Hangfire.HttpJob/wiki InstallationThis library is available as a NuGet Package:
Usage //StartUp.cs
public virtual void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(Configuration);//Configuration是下面的方法
}
private void Configuration(IGlobalConfiguration globalConfiguration)
{
globalConfiguration.UseStorage(
new MySqlStorage(
"Server=localhost;Port=3306;Database=hangfire;Uid=root;Pwd=123456;charset=utf8;SslMode=none;Allow User Variables=True",
new MySqlStorageOptions
{
TransactionIsolationLevel = IsolationLevel.ReadCommitted,
QueuePollInterval = TimeSpan.FromSeconds(15),
JobExpirationCheckInterval = TimeSpan.FromHours(1),
CountersAggregateInterval = TimeSpan.FromMinutes(5),
PrepareSchemaIfNecessary = false,
DashboardJobListLimit = 50000,
TransactionTimeout = TimeSpan.FromMinutes(1),
}))
.UseConsole()
.UseHangfireHttpJob();
}
public void Configure(IApplicationBuilder app)
{
app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire",new DashboardOptions
{
Authorization = new[] { new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions
{
RequireSsl = false,
SslRedirect = false,
LoginCaseSensitive = true,
Users = new []
{
new BasicAuthAuthorizationUser
{
Login = "admin",
PasswordClear = "test"
}
}
}) }
});
} add Hangfire HttpJob by client
How to add Hangfire.HttpJob by restful api1.add backgroundjob
2.add recurringjob
How to add Hangfire.HttpJob in DashbordEmail notifyThanks for the Rider IDE provided by JetBrains |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论