To use this function add it to the class library file named OrchestratorService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorService.ts
Description: Orchestrator Function to recurrent schedules a workflow.
Function WorkflowScheduleRecurrently
public WorkflowScheduleRecurrently(objWorkflow: Workflow, objProperties: Properties, strRecurrencePattern: string, dteStartDate: Date, dteEndDate: Date, strRecurrenceCycle: "one-time" | "every-minutes" | "every-hours" | "every-days" | "every-weeks" | "every-months", strUsername: string, strPassword: string): Task {
// strRecurrencePattern
// one-time: Ignores the recurrencePattern attribute
// every-minutes: Seconds into each minute at which the task starts, for example, "00" or "00, 30"
// every-hours: Minutes and seconds into each hour at which the task starts, for example, "00:00" or "00:00, 30:00"
// every-days: Time at which the task starts each day, for example, "18:30:00" or "12:00:00, 19:30:00"
// every-weeks: Day and time at which the task starts each week, for example, "Mon 00:00:00" or "Mon 00:00:00, Wed 18:00:00"
// every-months: Date and time at which the task starts each month, for example, "14 00:00:00" or "14 00:00:00, 28 18:00:00"
let objTask: Task = null;
try {
objTask = objWorkflow.scheduleRecurrently(objProperties, strRecurrencePattern, strRecurrenceCycle, dteStartDate, dteEndDate, strUsername, strPassword);
}
catch (objException) {
this.objLogger.info(objException);
}
return objTask;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
