Managing Schedules
You can use the schedule details window to monitor and manage the schedules you have created.
Resource Scheduler includes commands for the Console, CLI, and API to edit, clone, disable, enable, and delete schedules.
To manage 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'}
Managing schedule details
The schedule details window includes functions to monitor and manage the schedules you have created.
To display the details page for a specific schedule: - On the Resource Scheduler Schedules page, do one of the following to open the Schedule Details window:
- In the list of schedules, select the Actions menu ( ⁝ ) at the right end of the row that contains the schedule that you want to manage, and then select Edit Schedule.
- Select the name of the schedule that 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: Select 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: Select 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 () on the right side of the row. Select the menu, then select Copy OCID to copy the resource type and OCID.
- On the Resource Scheduler Schedules page, do one of the following to open the Schedule Details window:
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.