Schedule Management

createSchedule

Creates a new schedule. If both startTime and stopTime are specified, intervalUnits and interval are used to specify an interval time to repeat running the procedure.

You must specify a projectName and scheduleName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

scheduleName

Name for the schedule that must be unique among all schedules for the project.

Argument type: String

actualParameters

(Optional) Specifies the values to pass as parameters to the called procedure. Each parameter value is specified with an actualParameterName and a value. The actualParameterName must match the name of a formal parameter on the called procedure.

Argument type: Map

applicationName

(Optional) The name of the application that owns the process.

Argument type: String

applicationProjectName

(Optional) The name of the project to which the application belongs.

Argument type: String

beginDate

(Optional) < yyyy-mm-dd > The date you want the schedule to begin.

Argument type: String

credentialName

(Optional) The name of the credential to use for user impersonation when running the procedure. credentialName can be one of two forms: relative (for example, "cred1" ) —the credential is assumed to be in the project that contains the request target object. absolute (for example, "/projects/BuildProject/credentials/cred1" )—the credential can be from any specified project, regardless of the target object’s project.

Argument type: String

description

(Optional) A plain text or HTML description for this object. If using HTML, you must surround your text with <html> …​ </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul>

Argument type: String

endDate

(Optional) < yyyy-mm-dd > The date you want this schedule to end.

Argument type: String

environmentName

(Optional) The name of the environment where the application runs.

Argument type: String

environmentProjectName

(Optional) The name of the project to which the environment or environment template belongs.

Argument type: String

environmentTemplateName

(Optional) The name of the environment template used to create the dynamic environment.

Argument type: String

environmentTemplateProjectName

(Optional) Name of the project containing specified environment template.

Argument Type: String

environmentTemplateTierMapName

(Optional) The name of the environment template tier map used to create the dynamic environment where the application runs.

Argument type: String

insertRollingDeployManualStep

(Optional) < Boolean flag0|1|true|false >

When this argument is set to true or 1 a manual step needs to be added after each phase or batch is run.

Argument type: Boolean

interval

(Optional) Determines the repeat interval for starting new jobs.

If specified, the procedure, process, or workflow will be rescheduled continuously at intervals of this length. "Continuous" means that the procedure, process, or workflow is rescheduled as soon as the previous job finishes.

Argument type: String

intervalUnits

(Optional) Specifies the units for the interval argument <hours|minutes|seconds|continuous> If set to continuous, CloudBees CD creates a new job as soon as the previous job completes.

Argument type: String

misfirePolicy

(Optional) <ignore|runOnce> Specifies the misfire policy. A schedule may not fire at the allotted time because a prior job is still running, the server is running low on resources and there is a delay, or the server is down. When the underlying issue is resolved, the server will schedule the next job at the next regularly scheduled time slot if the policy is 'ignore', otherwise it will run the job immediately. Defaults to "ignore".

Argument type: MisfirePolicy

monthDays

(Optional) Restricts the schedule to specified days of the month. Specify numbers from 1-31, separating multiple numbers with a space.

Argument type: String

pipelineName

(Optional) Name of the pipeline to run.

Argument type: String

priority

(Optional) <low|normal|high|highest> Priorities take effect when two or more job steps in different jobs are waiting for the same resource. When the resource is available, it will be used by the job step that belongs to the job with the highest priority. If the priority level is the same, the resource will be used by the job step that belongs to the job with the lowest job ID number. If the job steps are in the same job, the resource will be used first by the step with the lowest job step ID number.

Argument type: JobPriority

procedureName

(Optional) Name of the procedure to run when the schedule is invoked.

Argument type: String

processName

(Optional) Name of the application process to run when the schedule is invoked.

Argument type: String

releaseName

(Optional) The name of the release to run when the schedule is invoked.

Argument type: String

rollingDeployEnabled

(Optional) < Boolean flag0|1|true|false >

When this argument is set to true or 1 the pipeline runs the rolling deployment.

Argument type: Boolean

rollingDeployManualStepAssignees

(Optional) A list of assignees who receive the notification when the rolling deploy iteration is completed.

Argument type: Collection

rollingDeployManualStepCondition

(Optional) The Run if condition (run condition) on the manual step that was created during the rolling deployment.

Argument type: NotificationType

rollingDeployPhases

(Optional) One or more rolling deploy phases to be used in the rolling deployment.

Argument type: Collection

scheduleDisabled

(Optional) < Boolean flag— 0|1|true|false > If set to 1, CloudBees CD will not start any new jobs from the schedule. Defaults to "false".

Argument type: Boolean

serviceName

(Optional) Name of the service that owns the process.

Argument type: Boolean

snapshotName

(Optional) Name of the snapshot used to invoke the application process.

Argument type: String

stagesToRun

(Optional) One or more stages to run in a pipeline.

Argument type: Collection

startTime

(Optional) The time of day to run the procedure, process, or workflow when the schedule is invoked. Using this schedule, CloudBees CD starts creating jobs at this time on the specified days.

Enter hours and minutes, formatted hh:mm, using the 24-hour clock (for example, 17:00).

Argument type: String

startingStage

(Optional) Name of the stage where the pipeline starts.

Argument type: String

startingStateName

(Optional) Name of the starting state of the workflow.

Argument type: String

stopTime

(Optional) The time of day to stop invoking the schedule.

CloudBees CD stops creating new jobs at this time, but a job in progress continues to run. If stopTime is not specified, CloudBees CD creates one job only on each specified day.

Enter hours and minutes, formatted hh:mm, using the 24-hour clock (for example, 17:00).

Argument type: String

tierMapName

(Optional) Name of the tier map that determines in which environment the application runs.

Argument type: String

tierResourceCounts

Resource count for each resource template tier.

Argument type: Map

timeZone

(Optional) Enter the time zone (string) you want to use for this schedule.

Argument type: String

weekDays

(Optional) Restricts the schedule to specified days of the week. Specify days of the week separated by spaces. Use English names "Monday", "Tuesday", and so on.

Argument type: String

workflowName

(Optional) Name of the workflow to run when the schedule is invoked.

Argument type: String

Positional arguments

projectName, scheduleName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->createSchedule(<projectName>, <scheduleName>, {<optionals>});

Example

$cmdr->createSchedule('Sample Project', 'Weekend', {startTime => '00:00',
        stopTime => '23:59',
        weekDays => 'Saturday Sunday',
        interval => 1,
   intervalUnits => 'hours',
actualParameter => [{actualParameterName => 'param1', value => 'value1'}] });

ectool

syntax: ectool createSchedule <projectName> <scheduleName> [optional]

Example

ectool createSchedule "Sample Project" "Weekend" --startTime 00:00 --stopTime 23:59 --weekDays "Saturday Sunday" --interval 1 --intervalUnits hours

deleteSchedule

Deletes a schedule.

You must specify a projectName and scheduleName.

Arguments Descriptions

projectName

The project to which the schedule belongs.

Argument type: String

scheduleName

The name of the schedule.

Argument type: String

Positional arguments

projectName, scheduleName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->deleteSchedule(<projectName>, <scheduleName>);

Example

$cmdr->deleteSchedule("Default", "Weekend Tests");

ectool

syntax: ectool deleteSchedule <projectName> <scheduleName>

Example

ectool deleteSchedule "Default" "Weekend Tests"

getSchedule

Retrieves a schedule by its name.

You must specify a projectName and scheduleName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

scheduleName

Name for the schedule that must be unique among all schedules for the project.

Argument type: String

Positional arguments

projectName, scheduleName

Response

One schedule element.

ec-perl

syntax: $cmdr->getSchedule(<projectName>, <scheduleName>);

Example

$cmdr->getSchedule("Default", "Weekend Tests");

ectool

syntax: ectool getSchedule <projectName> <scheduleName>

Example

ectool getSchedule "Default" "Weekend Tests"

getSchedules

Retrieves all schedules.

You must specify a projectName.

Arguments Descriptions

projectName

The name for the project that must be unique among all projects.

Argument type: String

applicationName

(Optional) The name of the application that owns the process.

Argument type: String

applicationProjectName

(Optional) The name for the project to which the application belongs.

Argument type: String

includeWorkflows

(Optional) To include workflow related schedules.

Argument type: String

pipelineName

(Optional) The name of the pipeline.

Argument type: String

processName

(Optional) The name of the application process.

Argument type: String

releaseName

(Optional) The name of the release.

Argument type: String

tierMapName

(Optional) The name of the tier map that determines the environment in which run the process.

Argument type: String

Positional arguments

projectName

Response

Zero or more schedule elements for all schedules within the named project.

ec-perl

syntax: $cmdr->getSchedules(<projectName> {<optionals>});

Example

$cmdr->getSchedules("Default" {applicationName => "Deploy"});

ectool

syntax: ectool getSchedules <projectName> [optional]

Example

ectool getSchedules "Default" --applicationName "Deploy"

modifySchedule

Modifies an existing schedule.

You must specify a projectName and a scheduleName.

Note: If both startTime and stopTime are specified, intervalUnits and interval are used to specify an interval to repeat running the procedure.

Arguments Descriptions

projectName

The name of the project that must be unique among all projects.

Argument type: String

scheduleName

The name of the schedule that must be unique among all schedules for the project.

Argument type: String

actualParameters

(Optional) Specifies the values to pass as parameters to the called procedure. Each parameter value is specified with an actualParameterName and a value. The actualParameterName must match the name of a formal parameter on the called procedure.

Argument type: Map

applicationProjectName

(Optional) Name of the project to which the application belongs.

Argument type: String

beginDate

(Optional) < yyyy-mm-dd > The date you want the schedule to begin (for example, 2016-05-15).

Argument type: String

clearActualParameters

(Optional) < Boolean flag — 0|1|true|false >

If set to true or 1, all the actual parameters are removed from the schedule.

Argument type: Boolean

credentialName

(Optional) The name of the credential to use for user impersonation when running the procedure. credentialName can be one of two forms: relative (for example, "cred1" ) —the credential is assumed to be in the project that contains the request target object. absolute (for example, "/projects/BuildProject/credentials/cred1" ) —the credential can be from any specified project, regardless of the target object’s project.

Argument type: String

description

(Optional) A plain text or HTML description for this object. If using HTML, you must surround your text with <html> …​ </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul>

Argument type: String

endDate

(Optional) < yyyy-mm-dd > The date you want this schedule to end (for example, 2016-05-15). The end date is not included in the range of dates.

Argument type: String

environmentName

(Optional) The name of the environment where the process will run.

Argument type: String

environmentProjectName

(Optional) The name of the project to which the environment or environment template belongs.

Argument type: String

environmentTemplateName

(Optional) The name of the environment template used to determine where the process will run.

Argument type: String

environmentTemplateProjectName

(Optional) Name of the project containing specified environment template. If this argument is not specified, the default is the environment project name.

Argument Type: String

environmentTemplateTierMapName

(Optional) The name of the environment template tier map used to determine how to spin up the environment where the process will run.

Argument type: String

insertRollingDeployManualStep

(Optional) < Boolean flag0|1|true|false >

When this argument is set to true or 1 a manual step needs to be added after each phase or batch is run.

Argument type: Boolean

interval

(Optional) Determines the repeat interval for starting new jobs.

Argument type: String

intervalUnits

(Optional) Specifies the units for the interval argument <hours|minutes|seconds|continuous>. If set to continuous, CloudBees CD creates a new job as soon as the previous job completes.

Argument type: IntervalUnits

misfirePolicy

(Optional) <ignore|runOnce> –Specifies the misfire policy. A schedule may not fire at the allotted time because a prior job is still running, the server is running low on resources and there is a delay, or the server is down. When the underlying issue is resolved, the server will schedule the next job at the next regularly scheduled time slot if the policy is 'ignore', otherwise it will run the job immediately. The default is ignore.

Argument type: IntervalUnits

monthDays

(Optional) Restricts the schedule to specified days of the month. Specify numbers from 1 to 31, separating multiple numbers with a space.

Argument type: String

newName

(Optional) New name of the schedule.

Argument type: String

pipelineName

(Optional) Name of the pipeline to run.

Argument type: String

priority

(Optional) <low|normal|high|highest> Priorities take effect when two or more job steps in different jobs are waiting for the same resource. When the resource is available, it will be used by the job step that belongs to the job with the highest priority. If the priority level is the same, the resource will be used by the job step that belongs to the job with the lowest job ID number. If the job steps are in the same job, the resource will be used first by the step with the lowest job step ID number.

Argument type: JobPriority

procedureName

(Optional) The name of the procedure to run when the schedule is invoked.

Argument type: String

processName

(Optional) The name of the process to run when the schedule is invoked.

Argument type: String

releaseName

(Optional) The name of the release to invoke.

Argument type: String

rollingDeployEnabled

(Optional) < Boolean flag0|1|true|false >

When this argument is set to true or 1 the pipeline runs the rolling deployment.

Argument type: Boolean

rollingDeployManualStepAssignees

(Optional) A list of assignees who receive the notification when the rolling deploy iteration is completed.

Argument type: Collection

rollingDeployManualStepCondition

(Optional) The Run if condition (run condition) on the manual step that was created during the rolling deployment.

Argument type: NotificationType

rollingDeployPhases

(Optional) One or more rolling deploy phases to be used in the rolling deployment.

Argument type: Collection

scheduleDisabled

(Optional) < Boolean flag — 0|1|true|false > If set to 1, CloudBees CD does not start any new jobs from the schedule.

Argument type: Boolean

snapshotName

(Optional) The name of the snapshot to use when the application process is invoked.

Argument type: String

startTime

(Optional) The time of day to begin running the procedure, process, or workflow when the schedule is invoked. Enter hours and minutes, formatted hh:mm, using the 24-hour clock (for example, 17:00). CloudBees CD starts creating jobs at this time on the days specified.

Argument type: String

stagesToRun

(Optional) One or more stages to run in a pipeline.

Argument type: Collection

startingStage

(Optional) Name of the stage where the pipeline starts.

Argument type: String

startingStateName

(Optional) The name of the starting state of the workflow.

Argument type: String

stopTime

(Optional) The time of day to stop invoking the schedule.

CloudBees CD stops creating new jobs at this time, but a job in progress continues to run. If stopTime is not specified, CloudBees CD creates one job only on each specified day.

Enter hours and minutes, formatted hh:mm, using the 24-hour clock (for example, 17:00).

Argument type: String

tierMapName

(Optional) The name of the tier map used to determine where to run the process. It maps application processes to environments.

Argument type: String

tierResourceCounts

(Optional) The resource count for each resource template tier.

Argument type: String

timeZone

(Optional) Enter the time zone you want to use for this schedule.

Argument type: String

weekDays

(Optional) Restricts the schedule to specified days of the week. Specify days of the week separated by spaces. Use English names "Monday", "Tuesday", and so on.

Argument type: String

workflowName

(Optional) The name of the workflow to run when the schedule is invoked.

Argument type: String

Positional arguments

projectName, scheduleName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->modifySchedule(<projectName>, <scheduleName>, {<optionals>});

Example

$cmdr->modifySchedule("Default", "Weekend",
      {procedureName => "Delay",
     actualParameter => {actualParameterName => "Delay Time",
                                       value => "5"}});

ectool

syntax: ectool modifySchedule <projectName> <scheduleName> [optionals]

Example

ectool modifySchedule "Default" "Weekend" --procedureName "Delay"
   --actualParameter "Delay Time=5"

pauseScheduler

Sets the scheduler to pause.

Arguments Descriptions

paused

< Boolean flag — 0|1|true|false >

If this argument set to 1 or true, set the scheduler to pause.

If this argument is set to 0 or false, set the scheduler to not pause.

Positional arguments

paused

Response

None or a status OK message.

ec-perl

syntax: $cmdr->pauseScheduler (<paused>);

Example

$cmdr->pauseScheduler (true);

ectool

syntax: ectool pauseScheduler <paused>

Example

ectool pauseScheduler true