Share via


BatchJobSchedule Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchJobSchedule

Implements

public final class BatchJobSchedule
implements JsonSerializable<BatchJobSchedule>

A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a specification used to create each Job.

Constructor Summary

Constructor Description
BatchJobSchedule(BatchJobSpecification jobSpecification)

Creates an instance of BatchJobSchedule class.

Method Summary

Modifier and Type Method and Description
static BatchJobSchedule fromJson(JsonReader jsonReader)

Reads an instance of BatchJobSchedule from the JsonReader.

OffsetDateTime getCreationTime()

Get the creationTime property: The creation time of the Job Schedule.

String getDisplayName()

Get the displayName property: The display name for the schedule.

String getETag()

Get the eTag property: The ETag of the Job Schedule.

BatchJobScheduleExecutionInfo getExecutionInfo()

Get the executionInfo property: Information about Jobs that have been and will be run under this schedule.

String getId()

Get the id property: A string that uniquely identifies the schedule within the Account.

BatchJobScheduleStatistics getJobScheduleStatistics()

Get the jobScheduleStatistics property: The lifetime resource usage statistics for the Job Schedule.

BatchJobSpecification getJobSpecification()

Get the jobSpecification property: The details of the Jobs to be created on this schedule.

OffsetDateTime getLastModified()

Get the lastModified property: The last modified time of the Job Schedule.

List<BatchMetadataItem> getMetadata()

Get the metadata property: A list of name-value pairs associated with the schedule as metadata.

BatchJobScheduleState getPreviousState()

Get the previousState property: The previous state of the Job Schedule.

OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the Job Schedule entered its previous state.

BatchJobScheduleConfiguration getSchedule()

Get the schedule property: The schedule according to which Jobs will be created.

BatchJobScheduleState getState()

Get the state property: The current state of the Job Schedule.

OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the Job Schedule entered the current state.

String getUrl()

Get the url property: The URL of the Job Schedule.

BatchJobSchedule setMetadata(List<BatchMetadataItem> metadata)

Set the metadata property: A list of name-value pairs associated with the schedule as metadata.

BatchJobSchedule setSchedule(BatchJobScheduleConfiguration schedule)

Set the schedule property: The schedule according to which Jobs will be created.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchJobSchedule

public BatchJobSchedule(BatchJobSpecification jobSpecification)

Creates an instance of BatchJobSchedule class.

Parameters:

jobSpecification - the jobSpecification value to set.

Method Details

fromJson

public static BatchJobSchedule fromJson(JsonReader jsonReader)

Reads an instance of BatchJobSchedule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchJobSchedule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getCreationTime

public OffsetDateTime getCreationTime()

Get the creationTime property: The creation time of the Job Schedule.

Returns:

the creationTime value.

getDisplayName

public String getDisplayName()

Get the displayName property: The display name for the schedule.

Returns:

the displayName value.

getETag

public String getETag()

Get the eTag property: The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime.

Returns:

the eTag value.

getExecutionInfo

public BatchJobScheduleExecutionInfo getExecutionInfo()

Get the executionInfo property: Information about Jobs that have been and will be run under this schedule.

Returns:

the executionInfo value.

getId

public String getId()

Get the id property: A string that uniquely identifies the schedule within the Account.

Returns:

the id value.

getJobScheduleStatistics

public BatchJobScheduleStatistics getJobScheduleStatistics()

Get the jobScheduleStatistics property: The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

Returns:

the jobScheduleStatistics value.

getJobSpecification

public BatchJobSpecification getJobSpecification()

Get the jobSpecification property: The details of the Jobs to be created on this schedule.

Returns:

the jobSpecification value.

getLastModified

public OffsetDateTime getLastModified()

Get the lastModified property: The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state.

Returns:

the lastModified value.

getMetadata

public List<BatchMetadataItem> getMetadata()

Get the metadata property: A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Returns:

the metadata value.

getPreviousState

public BatchJobScheduleState getPreviousState()

Get the previousState property: The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state.

Returns:

the previousState value.

getPreviousStateTransitionTime

public OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state.

Returns:

the previousStateTransitionTime value.

getSchedule

public BatchJobScheduleConfiguration getSchedule()

Get the schedule property: The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time.

Returns:

the schedule value.

getState

public BatchJobScheduleState getState()

Get the state property: The current state of the Job Schedule.

Returns:

the state value.

getStateTransitionTime

public OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the Job Schedule entered the current state.

Returns:

the stateTransitionTime value.

getUrl

public String getUrl()

Get the url property: The URL of the Job Schedule.

Returns:

the url value.

setMetadata

public BatchJobSchedule setMetadata(List<BatchMetadataItem> metadata)

Set the metadata property: A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Parameters:

metadata - the metadata value to set.

Returns:

the BatchJobSchedule object itself.

setSchedule

public BatchJobSchedule setSchedule(BatchJobScheduleConfiguration schedule)

Set the schedule property: The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time.

Parameters:

schedule - the schedule value to set.

Returns:

the BatchJobSchedule object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to