MasstransferExporter/MasstransferCommon/Annotation/ScheduledJobAttribute.cs

11 lines
319 B
C#
Raw Normal View History

namespace MasstransferCommon.Annotation;
/// <summary>
/// 通过添加特性注解实现开启定时任务
/// </summary>
/// <param name="cron"></param>
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class ScheduledJobAttribute(string cron) : Attribute
{
public string Cron { get; } = cron;
}