refactor 封装任务,调整人员获取
This commit is contained in:
18
Src/Dlhis.ScheduledTask/Attributes/RecurringJobAttribute.cs
Normal file
18
Src/Dlhis.ScheduledTask/Attributes/RecurringJobAttribute.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Kurisu.Scheduled.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RecurringJobAttribute : Attribute
|
||||
{
|
||||
public RecurringJobAttribute(string uniqueJobKey, string cron)
|
||||
{
|
||||
UniqueJobKey = uniqueJobKey;
|
||||
Cron = cron;
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string UniqueJobKey { get; }
|
||||
public string Cron { get; }
|
||||
|
||||
public string Queue { get; set; } = "default";
|
||||
}
|
||||
Reference in New Issue
Block a user