Browse Source

Merge pull request #20150 from abpframework/hangfirefix

Enhance CRON expression to support days
pull/20151/head
maliming 2 years ago
committed by GitHub
parent
commit
00a7c34eef
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerManager.cs

4
framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerManager.cs

@ -94,6 +94,10 @@ public class HangfireBackgroundWorkerManager : BackgroundWorkerManager, ISinglet
{
cron = $"0 */{time.TotalHours} * * *";
}
else if(time.TotalDays <= 31)
{
cron = $"0 0 0 1/{time.TotalDays} * *";
}
else
{
throw new AbpException(

Loading…
Cancel
Save