CronSchedule改为必须实现。

This commit is contained in:
Falcon 2025-02-20 17:24:11 +08:00
parent ace506c577
commit 222342969c

View File

@ -27,15 +27,16 @@ namespace Falcon.SugarApi.TimedBackgroundTask
/// <returns>如果继续执行返回True否则False</returns>
public abstract Task<bool> Run(CancellationToken cancellationToken);
/// <summary>
/// Timer心跳
/// </summary>
public virtual int Heartbeat { get; set; } = 1;
/// <summary>
/// 执行计划的Cron串
/// </summary>
public virtual string CronSchedule { get; set; } = "30 * * * * *";
public abstract string CronSchedule { get; }
/// <summary>
/// Timer心跳
/// </summary>
public virtual int Heartbeat { get; protected set; } = 1;
/// <summary>
/// 获取下次执行任务的计划