Schedules

5 minute readAutomation

You can create a standard schedule that specifies a set of times and days when a particular procedure, application process, plugin, pipeline, release, or data retention policy should run.

After a schedule is created for an item, the schedule can be edited, run manually, enabled, and disabled.

Creating a new schedule

To create a new schedule:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. Select Add schedule at the top right of the screen.

  3. Enter a name for the schedule, select the project in which you want to run the schedule, and enter an optional description.

  4. Select Next.

  5. In the left pane, select the type of item for which you want to create a schedule.

  6. In the middle pane, complete the options for the type of schedule you selected.

  7. In the right pane, do the following

    1. Select the start and end dates and times.

    2. Select to run the item once or to repeat it.

    3. Select the misfire policy you want to apply to this schedule. Choose between two options to manage how a schedule resumes in cases where the normal scheduled time is interrupted. The server may not be able to trigger a job at the scheduled time for one of several reasons:

      • A running job extends past the next scheduled runtime.

      • The server cannot find enough available resources, and a delay occurs.

      • The server is down or disconnected from the network for a period that overlaps one or more scheduled times.

        If any of these situations occur, the misfire policy defines two possible responses:

      • skip —All misfires are ignored and the job runs at the next scheduled time.

      • run once —After one or more misfires, the job runs at the soonest time that occurs within an active region. For example, at server startup a scheduled job will not trigger immediately on startup.

  8. Select Next.

  9. Enter any required parameters. The schedule cannot be executed unless all required parameters are provided. If you move the mouse over a field for a particular parameter, inline help displays the description of that parameter if one was provided in the procedure’s definition.

  10. On the Advanced tab, select a priority for this scheduled job.

    When a job is launched, its priority cannot be changed. 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.

    If you are using ectool, the priority can be set by passing "--priority=<low\|normal\|high\|highest>" to a runProcedure, createSchedule, or modifySchedule operation.

    Schedules are launched by the project’s principal user. To raise the priority above "normal," this user must have execute permission on the system-level access control list for priorities.

  11. Select the type of credential you want to use.

    If you select a credential for the schedule, it will be used as the default for jobs run from the schedule. For example, job steps will run under the account specified in the credential. However, the schedule’s credential is low in priority; it will be used only if no credential is specified in the procedure or its project. Also, individual steps can override the credential with a specific credential for that step. For more information, see Credentials and User Impersonation.

    Impersonation credentials are used to set the top-level impersonation credential for a job. If specified, the impersonation credential on the job is used as the default impersonation credential for all steps in the job.

  12. In Credential Project, select the name of the credential for the project. By default, the current project is selected.

  13. In Credential Name, select the name of the credential for the project. You might need to browse for this name.

  14. Select OK.

The job will run at the date and time you selected.

Viewing schedules

All schedules appear on the Schedules page in the CloudBees CD/RO UI.

To view schedules:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. Use the Find field to search for a particular schedule, or filter by project and type.

Running a schedule manually

Any pre-defined schedule can be run manually at any time outside of the set schedule. When you run a scheduled job manually, the job starts immediately and runs only once. The schedule will not run again until the next scheduled date and time.

To run a schedule manually:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Run column, select the Run icon for the schedule you want to run now.

    The Run icon is always disabled for data retention policy schedules. You cannot run schedules manually for data retention policies.
  3. Enter any required parameters on the Parameters tab.

  4. Select Advanced, and then select the priority for the job and credential information.

  5. Select OK.

Enabling or disabling a schedule

When the checkbox in the Enabled column is selected, the schedule will run at the date and time indicated in the schedule. You can disable a schedule at any time to prevent it from running. A disabled schedule will not run at the scheduled date and time until it is re-enabled. Additionally, a disabled job cannot be run manually.

You must have modify privileges on a schedule to be able to enable or disable it.

To enable or disable a schedule:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. Select or deslect the checkbox in the Enabled column.

Editing an existing schedule

You can change any of the settings in a schedule.

To edit an existing schedule:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Actions column, select the three vertical dots next to the schedule you want to edit.

  3. Select Details.

Adding custom schedule properties

To add custom schedule properties:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Actions column, select the three vertical dots next to the schedule to which you want to add custom properties.

  3. Select Properties. For more information on properties or access control, refer to Properties.

Editing the access control properties for a schedule

To edit access control:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Actions column, select the three vertical dots next to the schedule to which you want to add custom properties.

  3. Select Access Control. For more information on access control, refer to Access control

Viewing the change history for a schedule

To view the change history:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Actions column, select the three vertical dots next to the schedule you want to edit.

  3. Select Change History.

Exporting a DSL script for a schedule

You can generate and export a DSL script for schedules.

To export a DSL script:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Schedules.

  2. In the Actions column, select the three vertical dots next to the schedule you want to edit.

  3. Select DSL Export.