Abp Vnext 的 Vue3 实现版本
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.
 
 
 
 
 
 

17 lines
541 B

using Hangfire;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
namespace Lion.AbpPro.Jobs
{
public static class RecurringJobsExtensions
{
public static void CreateRecurringJob(this ApplicationInitializationContext context)
{
using var scope = context.ServiceProvider.CreateScope();
var testJob =
scope.ServiceProvider.GetService<TestJob>();
RecurringJob.AddOrUpdate("测试Job", () => testJob.ExecuteAsync(), CronType.Minute(1));
}
}
}