Class BatchJob
A scheduled or event-triggered batch job. Used as both the request and response body.
public sealed record BatchJob : IBatchJob
- Inheritance
-
objectBatchJob
- Implements
Properties
EndDate
When a periodic job stops running, or null for no end.
[JsonPropertyName("endDate")]
public DateTimeOffset? EndDate { get; init; }
Property Value
- DateTimeOffset?
EventName
The event an EVENT or SYSTEM job reacts to. POST batchjobevents/execute runs the
active jobs whose EventName and EventValue both match its request.
[JsonPropertyName("eventName")]
public string? EventName { get; init; }
Property Value
- string
EventValue
The event value the job reacts to, matched together with EventName.
[JsonPropertyName("eventValue")]
public string? EventValue { get; init; }
Property Value
- string
Handler
What the job runs: the Code of one of the handlers
GET batchjobhandlers lists.
[JsonPropertyName("handler")]
public string? Handler { get; init; }
Property Value
- string
Id
The batch job id. Server-assigned when the job is created with POST batchjobs.
[JsonPropertyName("id")]
public int? Id { get; init; }
Property Value
- int?
IsActive
Whether the job takes part in scheduling and events. Only active jobs are run by their schedule or by
POST batchjobevents/execute; running a job by id with POST batchjobs/{id}/execute works
either way.
[JsonPropertyName("isActive")]
public bool IsActive { get; init; }
Property Value
- bool
IsPeriodic
[JsonPropertyName("isPeriodic")]
public bool IsPeriodic { get; init; }
Property Value
- bool
JobType
What starts the job: SCHEDULE (its schedule), EVENT (POST batchjobevents/execute)
or SYSTEM (both). Case-insensitive on write; empty or unknown is stored as SCHEDULE.
[JsonPropertyName("jobType")]
public string? JobType { get; init; }
Property Value
- string
LastRunDate
When the job last ran. Maintained by the server; ignored on write.
[JsonPropertyName("lastRunDate")]
public DateTimeOffset? LastRunDate { get; init; }
Property Value
- DateTimeOffset?
Name
The display name of the job.
[JsonPropertyName("name")]
public string? Name { get; init; }
Property Value
- string
Parameters
The handler parameters stored with the job, in order. Saving a job replaces the stored list with this
one. Only filled by GET batchjobs/{id} and by a save - GET batchjobs leaves it
null.
[JsonPropertyName("parameters")]
public List<BatchJobParameter>? Parameters { get; init; }
Property Value
- List<BatchJobParameter>
ParentLogId
The Id of the run this job was created from, or null for a
top-level job. Read-only: saving a job does not change it. GET batchjobs without a
parentLogId lists only the jobs where this is null.
[JsonPropertyName("parentLogId")]
public long? ParentLogId { get; init; }
Property Value
- long?
PeriodicDayOfWeek
The weekdays the job may run on, as bit flags: Monday 1, Tuesday 2, Wednesday 4, Thursday 8, Friday 16, Saturday 32, Sunday 64. null or 0 means every day.
[JsonPropertyName("periodicDayOfWeek")]
public int? PeriodicDayOfWeek { get; init; }
Property Value
- int?
PeriodicType
The unit of the repeat interval: MINUTE, HOUR, DAY, WEEK, MONTH,
YEAR, CUSTOM (the handler computes its own run times) or NONE (run once at
StartDate). Case-insensitive on write; an unknown value leaves the stored one unchanged.
[JsonPropertyName("periodicType")]
public string? PeriodicType { get; init; }
Property Value
- string
PeriodicValue
The repeat interval in units of PeriodicType - 15 with MINUTE runs every 15
minutes. Has to be greater than 0 for a repeating schedule to run at all.
[JsonPropertyName("periodicValue")]
public int? PeriodicValue { get; init; }
Property Value
- int?
StartDate
When the schedule starts. A job with PeriodicType NONE runs once at this time;
a periodic one counts its intervals from it.
[JsonPropertyName("startDate")]
public DateTimeOffset? StartDate { get; init; }
Property Value
- DateTimeOffset?
TimeZoneId
The time zone the schedule is evaluated in, as a system time zone id the server knows (for example
W. Europe Standard Time or Europe/Berlin), or null for UTC.
[JsonPropertyName("timeZoneId")]
public string? TimeZoneId { get; init; }
Property Value
- string
UserId
The username of the job's owner, which a scheduled run executes as. Defaults to the caller on create; only a caller with the batch job administrator permission may save a job with a UserId other than their own.
[JsonPropertyName("userId")]
public string? UserId { get; init; }
Property Value
- string
UsergroupIds
The ids of the usergroups the job is assigned to. Only filled by GET batchjobs/{id} and ignored
on write - assign usergroups with POST batchjobs/{id}/usergroups/{usergroupId}.
[JsonPropertyName("usergroupIds")]
public List<string>? UsergroupIds { get; init; }
Property Value
- List<string>