Managing Schedules

This page describes the schedule details window and how to use it to monitor and manage the schedules you have created.

Note

Important! To create schedules using these procedures, you must have the permissions to access and modify Resource Scheduler schedules (see Example 1) AND you must create a policy to allow a schedule to manage resources (see Example 2).

For more information, see Authentication and Authorization, Resource Scheduler Policies, and Example Policies.

Example 1. This policy gives users permission to manage (create, delete, activate, and others) resource schedules in their tenancy.

General example
Allow group <groupname> to manage resource-schedule-family in tenancy

Specific example
Allow group ResourceScheduleAdmins to manage resource-schedule-family in tenancy

Example 2. This policy gives a resource schedule permission to perform an action on a resource.

When a resource schedule is created, by default, it doesn't have permission to perform the action on target resources, so you must give it permission.

This policy allows a schedule to manage predefined resources such as instances in a compartment.

General example
Allow any-user to manage <resource_type> 
in compartment id <compartment_ocid> where all
{request.principal.type='resourceschedule',
request.principal.id='<ocid_of_resourceschedule>'}

Specific example
Allow any-user to manage instance in
compartment id ocid.compartment.oc1...q7fa where all
{request.principal.type='resourceschedule',
request.principal.id='ocid.resourceschedule.oc1.iad.axgr...dt8zb'}
  • To display the details page for a specific schedule:
    1. Open the navigation menu and click Governance & Administration.
    2. Under Resource Scheduler, click Schedules. The list of existing schedules is displayed.
    3. Click the Display name of a schedule that you want to manage. The schedule Details page opens.
    4. Optional: Click the actions menu at the right end of the row that contains the schedule you want to manage. The schedule Details page opens.

    The main section of the schedule details page shows detailed information about the schedule, including the set of tasks that you can perform on a schedule.

    The Schedule Details section of the page shows these details about the schedule:

    • The schedule OCID, which you can show or hide, and copy
    • The Description of the schedule
    • Recurrence Details, for example, Every day at 00:00
    • The compartment ID, which you can show or hide, and copy
    • The last Action used in the schedule (Start or Stop)
    • The number of resources acted on by this schedule
    • Time Created- the time the schedule was created
    • Time Starts- the time the schedule started
    • End Date- the date the schedule ends
    • The last run date (if any)
    • The next run date (if any)

      Optional: Click Resources to open the Resources in schedule window. This window shows:

      • The Display Name,
      • The Resource type,
      • The resource OCID
      • The Compartment that the resource is in
      • The Status of the resource
      • The date the resource was created

    The Work Requests section of the details page is a table that shows the details of each schedule run.

    • The Run date when the schedule will run or has run
    • The number of Resources in this schedule
    • The Status of the schedule, including Succeeded, Failed, or Needs Attention.
    • The Duration of the run,

      Optional: Click the Run Date of the schedule to display details about the run. The Run details window opens. It shows the following details:

      • The schedule OCID
      • The Operation Type: Create schedule, Update schedule, Start resource, Stop resource
      • The status of the operation: Succeeded or Failed
      • The Resource Type, for example, resourceschedule
      • The work request OCID
      • The resource Status, for example: Created or In-progress
      • The Actions menu (Actions Menu) on the right side of the row. Click the menu, then click Copy OCID to copy the resource type and OCID.
  • Use the Resource SchedulerGet Schedule CLI command and required parameters to show schedule details.

    Command
    oci resource-scheduler schedule get --schedule-id, -? | -h | --help   

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Use the Resource Scheduler Get Schedule to list schedules.

    For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.

Editing a Schedule

This topic explains how to edit a schedule with the Console, CLI, and API.

  • This topic explains how to use the Console to change schedule information.

    You can edit a schedule from two places in Resource Scheduler.

    • The landing page (list schedules). On the landing page, click the Actions menu ( ⁝ ) at the right end of the row that contains the schedule that you want to edit. The edit schedule window opens.
    • The Schedule details page. Click Edit Schedule to open the Edit Schedule window.
    To edit a schedule:
    1. Click Edit to open the Edit window. The window includes a separate section for each major step to create a schedule. Each section shows all the information you entered or selected to create in that part of the process.
    2. Edit the information in each section as needed.
    3. Click Previous to return to the Schedule screen or click Create to save the edited schedule, or click Cancel to close the Edit window without saving any changes.
  • Use the Resource Scheduler Schedule Update CLIcommand and required parameters to edit a schedule.
    Command
    oci resource-scheduler schedule update --schedule-id, --action, --defined-tags, 
    --description, --display-name, --force, --freeform-tags, -? | -h | --help, --recurrence-details, 
    --resource-filters, --resources, --time-starts

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • use the Resource SchedulerUpdateSchedule API to edit a schedule.

    For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.

Cloning a schedule

You can clone a schedule from two places in the Resource Scheduler UI. There are no CLI or API functions to clone a schedule.

  • The landing page (list schedules). On the landing page, click the Actions menu ( ⁝ ) at the right end of the row that contains the schedule that you want to clone. The schedule details page opens.
  • The Schedule details page. Click Clone Schedule to open the Clone Schedule window.

The Clone schedule window includes a separate section for each major step to create a schedule. Each section shows all the information you entered or selected to create in that part of the schedule process.

Using the Console

  1. Edit the information in each section as needed.
    Note

    In the Basic section of the window, you must change the name of the schedule or enter a new name.
  2. After editing the individual parts of the schedule, click Review.
  3. Optional. Check the edited information in each section and edit as needed.
  4. Click Previous to go back to the Review and Save screen, or click Create to save the schedule, or click Cancel to close the Clone schedule window without saving the schedule.
  5. The window closes and returns to the Schedule details page. While Resource Scheduler creates the cloned schedule, the Status of the schedule is Creating.

Disabling a Schedule

This topic explains how to disable a schedule.

  • This topic explains how to disable a schedule using the Console.

    You can disable a schedule from two places in Resource Scheduler.

    • The landing page (list schedules)

      On the landing page, click the Actions menu ( ⁝ ) at the right end of the row that contains the schedule that you want to disable. The disable schedule window opens.

    • The Schedule details page. Click Disable Schedule to open the Edit Schedule window.
    To disable a schedule:
    1. In the list of schedules, click the name of a schedule that you want to disable. The details page for that schedule opens.
    2. Optional: At the right end of the row that contains the name of the schedule, click the Actions menu (Actions Menu) ( ⁝ ) to display a menu.
    3. Click Disable Schedule. The Disable Schedule confirmation dialog box opens.
    4. Click Disable to disable the schedule and close the dialog box, or click Cancel to close the dialog box without disabling the schedule.
      Note

      Disable works only during the initialization stage and when it is not running. If a schedule is running, disable cannot stop it.

      When you click Disable, the schedule is disabled, the dialog box closes, the Disable schedule button changes to Enable schedule, the label in the left pane changes to Inactive, and the Schedule icon changes color to brown.

    5. Optional: Return to the Resource Scheduler home page and display the list of schedules. Check the status of the schedule you just disabled and verify that it is now Disabled.
  • Use the Resource Scheduler ScheduleDeactivate CLI command and required parameters to disable a schedule.

    oci resource-scheduler schedule deactivate --schedule-id, -? | -h |
        --help

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • use the Resource Scheduler DeactivateSchedule API to disable a schedule.

    For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.

Enabling a Schedule

  • To enable a schedule:
    1. Open the navigation menu and click Governance & Administration.
    2. Under Resource Scheduler, click Schedules.
    3. In the list of schedules, click the name of the disabled schedule that you want to enable. The details page for that schedule opens.
    4. Click Enable Schedule. The Enable Schedule confirmation dialog box opens.
    5. Click Enable to enable the schedule and close the dialog box, or click Cancel to close the dialog box without enabling the schedule.
      Note

      When you click Enable, after the schedule is enabled, the button changes to Disable schedule, the label in the left pane changes to ACTIVE, and the Schedule icon changes color to green.
    6. Optional: Return to the Resource Scheduler home page and display the list of schedules. Check the status of the schedule you just disabled and verify that it is now Enabled.
  • Use the Resource Scheduler Schedule Activate CLI command and required parameters to disable a schedule.

    Command
    oci resource-scheduler schedule activate --schedule-id, -? | -h |
        --help

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Use the Resource Scheduler ActivateSchedule API to enable a schedule.

    For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.

Deleting a Schedule

This topic explains how to delete a schedule.

  • This topic explains how to delete a schedule using the Console.

    n
    Note

    When you delete a schedule, it is permanently removed from the database and cannot be retrieved. It you might want to refer to or reuse a completed schedule in the future, disable the schedule instead of deleting it.
    To delete a schedule:
    1. Open the navigation menu and click Governance & Administration.
    2. Under Resource Scheduler, click Schedules.
    3. At the right end of the row that contains the name of the schedule, click (action menu) to display the list of actions. Scroll to the end of the list and click Delete.
    4. Optional: In the list of schedules, click the name of a schedule that you want to delete. The details page for that schedule opens.
    5. Click Disable Schedule. The Disable Schedule confirmation dialog box opens.
    6. Click Disable Schedule to disable the schedule and close the dialog box, or click Cancel to close the dialog box without disabling the schedule.
    7. Optional: Return to the Resource Scheduler home page and display the list of schedules. Select the schedule that you just disabled and check the Status column to verify that the status is Disabled.
  • Use the Schedule Delete command and required parameters to delete a schedule.
    Commmand
    oci resource-scheduler schedule delete --schedule-id, --force, -? | -h |
        --hel

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Use the Resource Scheduler DeleteSchedule API to delete a schedule.

    For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.