feat: 添加日志组件
This commit is contained in:
@@ -3,17 +3,17 @@ using Volo.Abp.BackgroundWorkers.Quartz;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Jobs
|
||||
{
|
||||
public class TestJob : QuartzBackgroundWorkerBase
|
||||
{
|
||||
public TestJob()
|
||||
{
|
||||
JobDetail = JobBuilder.Create<TestJob>().WithIdentity(nameof(TestJob)).Build();
|
||||
Trigger = TriggerBuilder.Create().WithIdentity(nameof(TestJob)).WithCronSchedule("* * * * * ? *").Build();
|
||||
}
|
||||
public override Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
Console.WriteLine("你好,世界");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
//public class TestJob : QuartzBackgroundWorkerBase
|
||||
//{
|
||||
// public TestJob()
|
||||
// {
|
||||
// JobDetail = JobBuilder.Create<TestJob>().WithIdentity(nameof(TestJob)).Build();
|
||||
// Trigger = TriggerBuilder.Create().WithIdentity(nameof(TestJob)).WithCronSchedule("* * * * * ? *").Build();
|
||||
// }
|
||||
// public override Task Execute(IJobExecutionContext context)
|
||||
// {
|
||||
// Console.WriteLine("你好,世界");
|
||||
// return Task.CompletedTask;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace Yi.Framework.Rbac.Application
|
||||
|
||||
public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
|
||||
{
|
||||
//await context.AddBackgroundWorkerAsync<TestJob>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user