You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
479 B
15 lines
479 B
using MyCompanyName.MyProjectName.Jobs;
|
|
|
|
namespace MyCompanyName.MyProjectName.Extensions.Hangfire
|
|
{
|
|
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
|
|
});
|
|
}
|
|
}
|
|
}
|