Class ScheduleConfig
ScheduleConfig
Inherited Members
Namespace: Unity.Services.Apis.Admin.Scheduler
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "ScheduleConfig")]
[Preserve]
public class ScheduleConfig
Constructors
ScheduleConfig(string, string, string, string, string, int, string)
Initializes a new instance of the Schedule
Declaration
[Preserve]
public ScheduleConfig(string id = null, string name = null, string eventName = null, string type = null, string schedule = null, int payloadVersion = 0, string payload = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | id (required). |
string | name | The display name used to identify a schedule. This must be unique for currently scheduled events. (required). |
string | eventName | The schedule event name is passed through to the triggers service as part of the event type so that the trigger event is defined as |
string | type | Defines the type of schedule config. Supported schedule types: - recurring - one-time (required). |
string | schedule | Defines when the planned event should occur. If the schedule config has a type of |
int | payloadVersion | payloadVersion (required). |
string | payload | Defines JSON event payload. Maximum size of 1kb.. |
Properties
EventName
The schedule event name is passed through to the triggers service as part of the event type so that the trigger event is defined as com.unity.services.scheduler.{scheduleEventName}.v1
The triggers service uses this to identify incoming events and execute the configured action. For a trigger configuration to action an incoming event with type com.unity.services.scheduler.example-event.v1
, it would require a value of example-event
to be passed in here.
Declaration
[DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string EventName { get; set; }
Property Value
Type | Description |
---|---|
string | The schedule event name is passed through to the triggers service as part of the event type so that the trigger event is defined as |
Id
Gets or Sets Id
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
The display name used to identify a schedule. This must be unique for currently scheduled events.
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The display name used to identify a schedule. This must be unique for currently scheduled events. |
Payload
Defines JSON event payload. Maximum size of 1kb.
Declaration
[DataMember(Name = "payload", EmitDefaultValue = false)]
[Preserve]
public string Payload { get; set; }
Property Value
Type | Description |
---|---|
string | Defines JSON event payload. Maximum size of 1kb. |
PayloadVersion
Gets or Sets PayloadVersion
Declaration
[DataMember(Name = "payloadVersion", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int PayloadVersion { get; set; }
Property Value
Type | Description |
---|---|
int |
Schedule
Defines when the planned event should occur. If the schedule config has a type of one-time
this field must have a valid RFC3339 timestamp. If the schedule config has a type of recurring
this field must have a valid cron expression as per below: Field name | Allowed values | Allowed special characters - -- -- -- -- - | - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- -- -- -- -- - Minutes | 0-59 | * / , - Hours | 0-23 | * / , - Day of month | 1-31 | * / , - Month | 1-12 or JAN-DEC | * / , - Day of week | 0-6 or SUN-SAT | * / , - Recurring schedules have a minimum scheduled frequency of once per hour.
Declaration
[DataMember(Name = "schedule", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Schedule { get; set; }
Property Value
Type | Description |
---|---|
string | Defines when the planned event should occur. If the schedule config has a type of |
Type
Defines the type of schedule config. Supported schedule types: - recurring - one-time
Declaration
[DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
string | Defines the type of schedule config. Supported schedule types: - recurring - one-time |