up
This commit is contained in:
43
templates/stellaops-plugin-scheduler/MyJobOptions.cs
Normal file
43
templates/stellaops-plugin-scheduler/MyJobOptions.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace StellaOps.Plugin.MyJob;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration options for the MyJob scheduled plugin.
|
||||
/// </summary>
|
||||
public sealed class MyJobOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// The configuration section name.
|
||||
/// </summary>
|
||||
public const string SectionName = "Plugins:MyJob";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the cron schedule expression.
|
||||
/// Default: "0 0 * * *" (daily at midnight).
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string CronSchedule { get; set; } = "0 0 * * *";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the job is enabled.
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum execution time in minutes.
|
||||
/// </summary>
|
||||
[Range(1, 1440)]
|
||||
public int MaxExecutionMinutes { get; set; } = 60;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the batch size for processing items.
|
||||
/// </summary>
|
||||
[Range(1, 10000)]
|
||||
public int BatchSize { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether to continue processing on error.
|
||||
/// </summary>
|
||||
public bool ContinueOnError { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user