Documentation > CMS Template API Library > Asset > SetSchedule(String,DateTime,Boolean)


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)


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


// 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));

Connect with Crownpeak