Skip to content

JobSchedule

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The schedule record defining when and how a job runs.

public sealed record JobSchedule : IEquatable<JobSchedule>

objectJobSchedule

IEquatable<JobSchedule>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

If Cron is left empty, the schedule is triggered only manually (POST .../trigger); no automatic next-run time is computed.

public JobSchedule()

The creation time (UTC).

public required DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

The identifier of the user/service that created the schedule.

public string? CreatedBy { get; init; }

string?

The five-field cron expression (minute hour day-of-month month day-of-week). If null, the schedule is triggered only manually.

public string? Cron { get; init; }

string?

Whether the schedule is enabled. If disabled, it is not triggered automatically.

public bool Enabled { get; init; }

bool

The schedule identifier.

public Guid Id { get; init; }

Guid

The kind of job this schedule produces.

public required JobKind Kind { get; init; }

JobKind

The last run time (UTC). null if it never ran.

public DateTimeOffset? LastRunAt { get; init; }

DateTimeOffset?

The schedule name, unique within the tenant.

public required string Name { get; init; }

string

The next automatic run time (UTC). null if there is no cron.

public DateTimeOffset? NextRunAt { get; init; }

DateTimeOffset?

The input set or parameters. Interpreted according to the job kind.

public JsonElement Payload { get; init; }

JsonElement

The agent or workflow name to run.

public required string TargetName { get; init; }

string

The tenant the schedule belongs to.

public required string TenantId { get; init; }

string

The time zone the Cron expression is interpreted in.

public string TimeZone { get; init; }

string

The last-updated time (UTC).

public required DateTimeOffset UpdatedAt { get; init; }

DateTimeOffset

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(JobSchedule? other)

other JobSchedule?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(JobSchedule? left, JobSchedule? right)

left JobSchedule?

right JobSchedule?

bool

public static bool operator !=(JobSchedule? left, JobSchedule? right)

left JobSchedule?

right JobSchedule?

bool