Syntax

Platform.Function.InvokeSchedule(apiObject, action, schedule[, statusArray, options])
3–5 arguments

Parameters

Name Type Required Description
apiObject object Yes SOAP API object built with CreateObject and configured with SetObjectProperty
action string Yes Action to perform on the object (e.g. "start")
schedule object Yes Schedule definition object specifying timing and recurrence
statusArray array No Array that receives the status and RequestID of the API call
options object No Additional API options; may be null

Examples

var sendDef = Platform.Function.CreateObject("EmailSendDefinition");
Platform.Function.SetObjectProperty(sendDef, "CustomerKey", "MySendDef");

var scheduleDef = Platform.Function.CreateObject("ScheduleDefinition");
Platform.Function.SetObjectProperty(scheduleDef, "RecurrenceType", "Daily");
Platform.Function.SetObjectProperty(scheduleDef, "Occurrences", "1");

var statusArr = [];
var result = Platform.Function.InvokeSchedule(sendDef, "start", scheduleDef, statusArr, null);
Write("Result: " + result);

WSProxy is the recommended approach for most SOAP API interactions. Use InvokeSchedule only when the Schedule SOAP verb is specifically required.

See Also