Show / Hide Table of Contents

Class ScheduledJob

The object that defines a scheduled job. For more information about jobs, see Managing Jobs.

Inheritance
object
ScheduledJob
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.OsmanagementhubService.Models
Assembly: OCI.DotNetSDK.Osmanagementhub.dll
Syntax
public class ScheduledJob

Properties

CompartmentId

Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type Description
string

The OCID of the compartment that contains the scheduled job.

Remarks

Required

DefinedTags

Declaration
[Required(ErrorMessage = "DefinedTags is required.")]
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type Description
Dictionary<string, Dictionary<string, object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations": {"CostCenter": "42"}}

Remarks

Required

Description

Declaration
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
Property Value
Type Description
string

User-specified description for the scheduled job.

DisplayName

Declaration
[Required(ErrorMessage = "DisplayName is required.")]
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type Description
string

User-friendly name for the scheduled job.

Remarks

Required

FreeformTags

Declaration
[Required(ErrorMessage = "FreeformTags is required.")]
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type Description
Dictionary<string, string>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Remarks

Required

Id

Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type Description
string

The OCID of the scheduled job.

Remarks

Required

IsManagedByAutonomousLinux

Declaration
[JsonProperty(PropertyName = "isManagedByAutonomousLinux")]
public bool? IsManagedByAutonomousLinux { get; set; }
Property Value
Type Description
bool?

Indicates whether this scheduled job is managed by the Autonomous Linux service.

IsRestricted

Declaration
[JsonProperty(PropertyName = "isRestricted")]
public bool? IsRestricted { get; set; }
Property Value
Type Description
bool?

Indicates if the schedule job has restricted update and deletion capabilities. For restricted scheduled jobs, you can update only the timeNextExecution, recurringRule, and tags.

IsSubcompartmentIncluded

Declaration
[JsonProperty(PropertyName = "isSubcompartmentIncluded")]
public bool? IsSubcompartmentIncluded { get; set; }
Property Value
Type Description
bool?

Indicates whether to apply the scheduled job to all compartments in the tenancy when managedCompartmentIds specifies the tenancy OCID (root compartment).

LifecycleStageIds

Declaration
[JsonProperty(PropertyName = "lifecycleStageIds")]
public List<string> LifecycleStageIds { get; set; }
Property Value
Type Description
List<string>

The lifecycle stage OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedInstanceGroupIds, and managedCompartmentIds.

LifecycleState

Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public ScheduledJob.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type Description
ScheduledJob.LifecycleStateEnum?

The current state of the scheduled job.

Remarks

Required

Locations

Declaration
[JsonProperty(PropertyName = "locations")]
public List<ManagedInstanceLocation> Locations { get; set; }
Property Value
Type Description
List<ManagedInstanceLocation>

The list of locations this scheduled job should operate on for a job targeting on compartments. (Empty list means apply to all locations). This can only be set when managedCompartmentIds is not empty.

ManagedCompartmentIds

Declaration
[JsonProperty(PropertyName = "managedCompartmentIds")]
public List<string> ManagedCompartmentIds { get; set; }
Property Value
Type Description
List<string>

The compartment OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedInstanceGroupIds, and lifecycleStageIds.

ManagedInstanceGroupIds

Declaration
[JsonProperty(PropertyName = "managedInstanceGroupIds")]
public List<string> ManagedInstanceGroupIds { get; set; }
Property Value
Type Description
List<string>

The managed instance group OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedCompartmentIds, and lifecycleStageIds.

ManagedInstanceIds

Declaration
[JsonProperty(PropertyName = "managedInstanceIds")]
public List<string> ManagedInstanceIds { get; set; }
Property Value
Type Description
List<string>

The managed instance OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceGroupIds, managedCompartmentIds, and lifecycleStageIds.

Operations

Declaration
[Required(ErrorMessage = "Operations is required.")]
[JsonProperty(PropertyName = "operations")]
public List<ScheduledJobOperation> Operations { get; set; }
Property Value
Type Description
List<ScheduledJobOperation>

The list of operations this scheduled job needs to perform. A scheduled job supports only one operation type, unless it is one of the following:

  • UPDATE_PACKAGES
  • UPDATE_ALL
  • UPDATE_SECURITY
  • UPDATE_BUGFIX
  • UPDATE_ENHANCEMENT
  • UPDATE_OTHER
  • UPDATE_KSPLICE_USERSPACE
  • UPDATE_KSPLICE_KERNEL
Remarks

Required

RecurringRule

Declaration
[JsonProperty(PropertyName = "recurringRule")]
public string RecurringRule { get; set; }
Property Value
Type Description
string

The frequency schedule for a recurring scheduled job.

RetryIntervals

Declaration
[JsonProperty(PropertyName = "retryIntervals")]
public List<int> RetryIntervals { get; set; }
Property Value
Type Description
List<int>

The amount of time in minutes to wait until retrying the scheduled job. If set, the service will automatically retry a failed scheduled job after the interval. For example, you could set the interval to [2,5,10]. If the initial execution of the job fails, the service waits 2 minutes and then retries. If that fails, the service waits 5 minutes and then retries. If that fails, the service waits 10 minutes and then retries.

ScheduleType

Declaration
[Required(ErrorMessage = "ScheduleType is required.")]
[JsonProperty(PropertyName = "scheduleType")]
[JsonConverter(typeof(ResponseEnumConverter))]
public ScheduleTypes? ScheduleType { get; set; }
Property Value
Type Description
ScheduleTypes?

The type of scheduling frequency for the job.

Remarks

Required

SystemTags

Declaration
[JsonProperty(PropertyName = "systemTags")]
public Dictionary<string, Dictionary<string, object>> SystemTags { get; set; }
Property Value
Type Description
Dictionary<string, Dictionary<string, object>>

System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud": {"free-tier-retained": "true"}}

TimeCreated

Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type Description
DateTime?

The time this scheduled job was created (in RFC 3339 format).

Remarks

Required

TimeLastExecution

Declaration
[JsonProperty(PropertyName = "timeLastExecution")]
public DateTime? TimeLastExecution { get; set; }
Property Value
Type Description
DateTime?

The time of the last execution of this scheduled job (in RFC 3339 format).

TimeNextExecution

Declaration
[Required(ErrorMessage = "TimeNextExecution is required.")]
[JsonProperty(PropertyName = "timeNextExecution")]
public DateTime? TimeNextExecution { get; set; }
Property Value
Type Description
DateTime?

The time of the next execution of this scheduled job (in RFC 3339 format).

Remarks

Required

TimeUpdated

Declaration
[Required(ErrorMessage = "TimeUpdated is required.")]
[JsonProperty(PropertyName = "timeUpdated")]
public DateTime? TimeUpdated { get; set; }
Property Value
Type Description
DateTime?

The time this scheduled job was updated (in RFC 3339 format).

Remarks

Required

WorkRequestId

Declaration
[JsonProperty(PropertyName = "workRequestId")]
public string WorkRequestId { get; set; }
Property Value
Type Description
string

The OCID for the work request that will be rerun.

WorkRequestIds

Declaration
[JsonProperty(PropertyName = "workRequestIds")]
public List<string> WorkRequestIds { get; set; }
Property Value
Type Description
List<string>

The list of work request OCIDs associated with this scheduled job.

In this article
Back to top