Table of Contents

Method IsDue

Namespace
Oscova.Agents.Tasks
Assembly
Oscova.Agents.dll

IsDue(AgentTaskDefinition, AgentTaskRun?, DateTimeOffset)

Determines whether a task is due to run now.

public static bool IsDue(AgentTaskDefinition task, AgentTaskRun? latestRun, DateTimeOffset now)

Parameters

task AgentTaskDefinition

The task definition and schedule to evaluate.

latestRun AgentTaskRun?

The latest known run for the task, if any.

now DateTimeOffset

The current UTC timestamp used for evaluation.

Returns

bool

true when the task should start a new run.