.NET API
JobSchedule
Tracon.Abstractions.dllThe schedule record defining when and how a job runs.
public sealed record JobSchedule : IEquatable<JobSchedule>- Inheritance
- object ← JobSchedule
- Implements
- IEquatable<JobSchedule>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”If Cron is left empty, the schedule is triggered only
manually (POST .../trigger); no automatic next-run time is computed.
Constructors
Section titled “Constructors”JobSchedule()
Section titled “ JobSchedule()”public JobSchedule()Properties
Section titled “Properties”CreatedAt
Section titled “ CreatedAt”The creation time (UTC).
public required DateTimeOffset CreatedAt { get; init; }Property Value
Section titled “Property Value”CreatedBy
Section titled “ CreatedBy”The identifier of the user/service that created the schedule.
public string? CreatedBy { get; init; }Property Value
Section titled “Property Value”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; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”Whether the schedule is enabled. If disabled, it is not triggered automatically.
public bool Enabled { get; init; }Property Value
Section titled “Property Value”HandlerKey
Section titled “ HandlerKey”The key of the IJobHandler the jobs this schedule produces are dispatched to. See JobHandlerKeys.
public required string HandlerKey { get; init; }Property Value
Section titled “Property Value”The schedule identifier.
public Guid Id { get; init; }Property Value
Section titled “Property Value”The lane the jobs this schedule produces run in. See
JobLanes. Both a cron-dispatched run and a manual
POST .../trigger inherit this value.
public string Lane { get; init; }Property Value
Section titled “Property Value”LastRunAt
Section titled “ LastRunAt”The last run time (UTC). null if it never ran.
public DateTimeOffset? LastRunAt { get; init; }Property Value
Section titled “Property Value”The schedule name, unique within the tenant.
public required string Name { get; init; }Property Value
Section titled “Property Value”NextRunAt
Section titled “ NextRunAt”The next automatic run time (UTC). null if there is no cron.
public DateTimeOffset? NextRunAt { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The worker picks a due schedule by this value and computes every later one itself. A schedule written straight to IJobScheduleStore with a cron expression must therefore carry its first run time here: saved with null, it never runs. A time at or before now runs it on the worker’s next pass. The scheduling API sets it for you.
Payload
Section titled “ Payload”The input set or parameters. Interpreted by the job’s handler.
public JsonElement Payload { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”An unset payload is stored as the empty JSON array, never as
JsonValueKind.Undefined or JSON null: an undefined
value cannot be written as JSON, and SQL Server rejects a null
literal in a JSON column. Every reader treats the empty array as “no payload”.
TargetName
Section titled “ TargetName”The agent or workflow name to run.
public required string TargetName { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”The tenant the schedule belongs to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”TimeZone
Section titled “ TimeZone”The time zone the Cron expression is interpreted in.
public string TimeZone { get; init; }Property Value
Section titled “Property Value”UpdatedAt
Section titled “ UpdatedAt”The last-updated time (UTC).
public required DateTimeOffset UpdatedAt { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(JobSchedule?)
Section titled “ Equals(JobSchedule?)”public bool Equals(JobSchedule? other)Parameters
Section titled “Parameters”other JobSchedule?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(JobSchedule?, JobSchedule?)
Section titled “ operator ==(JobSchedule?, JobSchedule?)”public static bool operator ==(JobSchedule? left, JobSchedule? right)Parameters
Section titled “Parameters”left JobSchedule?
right JobSchedule?
Returns
Section titled “Returns”operator !=(JobSchedule?, JobSchedule?)
Section titled “ operator !=(JobSchedule?, JobSchedule?)”public static bool operator !=(JobSchedule? left, JobSchedule? right)Parameters
Section titled “Parameters”left JobSchedule?
right JobSchedule?