Documentation > CMS Template API Library > Asset > SetSchedule(String,DateTime,Boolean)
SetSchedule
Allows you to set a scheduled workflow transition (usually a publish or retire) for the specified asset. You must provide the schedule name as configured in the workflow. The schedule date must include a date and time. Input time is assumed to be Pacific Time.
public System.Boolean SetSchedule(String,DateTime,Boolean)
Parameters
Name | Description | Type |
---|---|---|
scheduleName | Name of the schedule. | System.String |
dateTime | The date time. | System.DateTime |
publishDependencies | Optional: Include dependencies when publishing the asset. Defaults to false. | System.Boolean |
Code Example
C#
Sample:
// The asset will be published to Live 3 days from now. // "Live Date" must be defined in the workflow for this asset! asset.SetSchedule("Live Date", DateTime.Now.AddDays(3));