15 lines
457 B
C#
Raw Normal View History

2025-05-27 14:02:24 +08:00
using JiShe.ServicePro.Jobs;
2025-03-11 10:24:11 +08:00
2025-05-27 14:02:24 +08:00
namespace JiShe.ServicePro.Extensions.Hangfire
2025-03-11 10:24:11 +08:00
{
public static class RecurringJobsExtensions
{
public static void CreateRecurringJob(this ApplicationInitializationContext context)
{
RecurringJob.AddOrUpdate<TestJob>("测试Job", e => e.ExecuteAsync(), CronType.Minute(1), new RecurringJobOptions()
{
TimeZone = TimeZoneInfo.Local
});
}
}
}