diff --git a/src/modules/Elsa.Retention/Feature/RetentionFeature.cs b/src/modules/Elsa.Retention/Feature/RetentionFeature.cs index cd8b661d2e..f299229094 100644 --- a/src/modules/Elsa.Retention/Feature/RetentionFeature.cs +++ b/src/modules/Elsa.Retention/Feature/RetentionFeature.cs @@ -30,6 +30,11 @@ public RetentionFeature(IModule module) : base(module) /// public Action ConfigureCleanupOptions { get; set; } = _ => { }; + /// + /// Defines the run interval of the cleanup job + /// + public TimeSpan SweepInterval { get; set; } = TimeSpan.FromHours(4); + /// public override void Apply() { @@ -44,7 +49,7 @@ public override void Apply() Services.AddScoped(); Services.AddScoped(); - Services.AddRecurringTask(TimeSpan.FromHours(4)); + Services.AddRecurringTask(SweepInterval); foreach (var policy in this.GetPolicies()) {