Cron Class

  • java.lang.Object
    • com.azure.resourcemanager.machinelearning.models.Cron

Implements

public final class Cron
implements JsonSerializable<Cron>

The workflow trigger cron for ComputeStartStop schedule type.

Constructor Summary

Constructor Description
Cron()

Creates an instance of Cron class.

Method Summary

Modifier and Type Method and Description
String expression()

Get the expression property: [Required] Specifies cron expression of schedule.

static Cron fromJson(JsonReader jsonReader)

Reads an instance of Cron from the JsonReader.

String startTime()

Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.

String timeZone()

Get the timeZone property: Specifies time zone in which the schedule runs.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Cron withExpression(String expression)

Set the expression property: [Required] Specifies cron expression of schedule.

Cron withStartTime(String startTime)

Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.

Cron withTimeZone(String timeZone)

Set the timeZone property: Specifies time zone in which the schedule runs.

Methods inherited from java.lang.Object

Constructor Details

Cron

public Cron()

Creates an instance of Cron class.

Method Details

expression

public String expression()

Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.

Returns:

the expression value.

fromJson

public static Cron fromJson(JsonReader jsonReader)

Reads an instance of Cron from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the Cron.

startTime

public String startTime()

Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.

Returns:

the startTime value.

timeZone

public String timeZone()

Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11.

Returns:

the timeZone value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExpression

public Cron withExpression(String expression)

Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.

Parameters:

expression - the expression value to set.

Returns:

the Cron object itself.

withStartTime

public Cron withStartTime(String startTime)

Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.

Parameters:

startTime - the startTime value to set.

Returns:

the Cron object itself.

withTimeZone

public Cron withTimeZone(String timeZone)

Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11.

Parameters:

timeZone - the timeZone value to set.

Returns:

the Cron object itself.

Applies to