feat Hnagfire初步搭建
This commit is contained in:
12
Src/Dlhis.ScheduledTask/MyBackgroundJobService.cs
Normal file
12
Src/Dlhis.ScheduledTask/MyBackgroundJobService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Hangfire;
|
||||
|
||||
namespace Dlhis.ScheduledTask
|
||||
{
|
||||
public class MyBackgroundJobService
|
||||
{
|
||||
public void EnqueueMyJob()
|
||||
{
|
||||
BackgroundJob.Enqueue(() => Console.WriteLine("This is a background job."));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user