< Summary

Information
Class: Elsa.Common.RecurringTasks.CronSchedule
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/RecurringTasks/CronSchedule.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 11
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
CreateTimer(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/RecurringTasks/CronSchedule.cs

#LineLine coverage
 1using Cronos;
 2
 3namespace Elsa.Common.RecurringTasks;
 4
 05public class CronSchedule(ISystemClock systemClock, CronExpression expression) : ISchedule
 6{
 7    public ScheduledTimer CreateTimer(Func<Task> action)
 8    {
 09        return new ScheduledTimer(action, () => expression.GetNextOccurrence(systemClock.UtcNow.DateTime)!.Value - syste
 10    }
 11}