SiteScheduledJobs.create (Method)
Create a new scheduled job.
Returns:
SiteScheduledJobID (integer)
Arguments:
Name | Type | Required | Description |
---|---|---|---|
sourceScope | PrimaryScope | Required | A string describing the source scope (Server, Customer or Site). |
jobDefinitionID | PositiveInteger | Required | The ID of the job definition at the specified source scope. |
displayName | PlainText_NonNull_100 | Required | The user given name of the scheduled job instance. |
serverID | ServerID_Spec | Required | The unique ID of the server on which the job runs. 0 for all servers. |
startDate | Date | Required | The date the job starts running. |
startTime | Time | Required | The time the job starts. |
frequency | ScheduledJobFrequency | Required | The frequency type (One Time, Recurring Daily, Recurring Weekly, Recurring Monthly, Daily Every). |
intervalSeconds | NonNegativeInteger | Optional. Defaults to '0'. | When frequency is Daily Every, the interval of seconds between jobs, otherwise 0. |
endDate | FutureDate_EmptyString | Optional. Defaults to an empty string. | The date the job stops running or an empty string. |
endTime | Time_EmptyString | Optional. Defaults to '23:59:59'. | The time the job ends or an empty string. |
properties | Struct | Optional. Defaults to '#StructNew()#'. | A structure that describes all of the parameters for the scheduled job. |
Context:
License Requirements | (none) |
Permission Requirements | Contributor |
Deny Context | ClusterROPS |
Require Context | (none) |
Author Lock | (not required) |
Transaction Logging | If transaction logging is enabled at the site level, calls to this method will be logged |
Customization | Customization is not supported for this method. |
Error Codes:
Code | Error Message |
---|---|
39000 | Another scheduled job with the same name already exists. |
39002 | Interval cannot be less than one minute if the frequency is 'Daily Every'. |
39005 | The specified job definition is not a valid $1 level job definition. |
39009 | The target scope of the specified job definition is not '$1'. |
Notes:
None