You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using DS.WMS.Core.HangfireJob.Interface;
|
|
|
|
|
using Hangfire;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 注册Hangfire定时任务的中间件
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class JobMiddleware
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 注册Hangfire定时任务的中间件
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="app"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static WebApplication UseJobMiddlewares(this WebApplication app)
|
|
|
|
|
{
|
|
|
|
|
//RecurringJob.AddOrUpdate<IFeeCustTemplateJobService>(nameof(IFeeCustTemplateJobService),
|
|
|
|
|
// s => s.GenerateFeesAsync(), Cron.Daily(23, 30));
|
|
|
|
|
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|