Listing Existing Schedules

You can list existing schedules and see the details and description of the information in a schedule with the Console, CLI, and API.

Authentication, Authorization, and Required Policies

Resource Scheduler uses the Identity and Access Management IAM process that is used to ensure secure access to Resource Scheduler, to create schedules, and to use schedules to manage resources.

Each service in Oracle Cloud Infrastructure integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API).

An administrator in your organization needs to set up groups , compartments , andpolicies  that control which users can access which services, which resources, and the type of access. For example, the policies control who can create new users, create and manage the cloud network, launch instances, create buckets, download objects, and so on. For more information, see Managing Identity Domains. For specific details about writing policies for each of the different services, see the Policy Reference.

Required Policies

Important

To create and manage schedules you must create a policy to give users permission to create and change schedules AND you must create a policy to allow a schedule to manage resources.

Example 1. This policy gives users permission to create and modify schedules

Allow the ResourceScheduleUsers group to view and list resource schedules in tenancy.

Allow ResourceScheduleUsers to inspect resource-schedule in tenancy

Example 2. This policy gives the resource schedule permission to perform an action on the target 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.

General example
Allow any-user to manage <resource_type (instance, database, and others)> in compartment id <target_compartment_ocid> where all {request.principal.type='resourceschedule',request.principal.id='ocid_of_resourceschedule'}
Note

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

If you are a regular user (not an administrator) who needs to use the Oracle Cloud Infrastructure resources that your company owns, contact your administrator to set up a user ID for you. The administrator can confirm which compartment or compartments you should be using.

To use any of the Resource Scheduler API operations, you must be authorized in an IAM policy. If you're not authorized, contact the administrator. If you're an administrator who needs to write policies to give users access, see Managing Identity Domains

Example Schedules

You can create several types of schedules as shown in the following example.

Example schedules in <compartment name>
Display Name Lifecycle State Schedule Action Resource Criteria Last Run Date UTC time Last Run Status Next run date ⁝ (see actions menu)
Schedule1 Enabled Every week at 10:00 on Monday Start Select Resources Wed, Feb 21, 2024, 20:00:00 UTC Success Thu, Feb 22, 2024, 20:00:00 UTC
Compute1 Enabled Every 2 weeks at 8:00 on Wednesday Stop Compartment, Type Mon, Mar 4, 2024, 20:00:00 UTC Success Wed, Mar 6, 2024, 16:00:00 UTC
Instance3 Pending At 0800 on April 1, 2024 Start Type, Tag - - Mon, April 1, 2024, 15:00:00 UTC
Autonomous Database 1 Disabled Every hour at 00 Start Type Fri, Mar 15, 2024, 20:00:00 UTC Success Mon, Apr 1, 2024, 20:00:00 UTC
Autonomous Database 2 Disabled Every hour at 30 Stop Compartment, Type Mon, Mar 18, 2024, 20:00:00 UTC Error Mon, Apr 1, 2024, 20:00:00 UTC
Showing 5 items <1 of 1>
Schedule details
Component Description
(Schedule) Status

Select Creating to display the list of statuses. Highlight and select the status of the schedules that you want to see.

  • Creating (default) When you create a schedule, Resource Scheduler creates a work request with the information you have entered. It takes a minute or more for the work request to process the information and create a schedule.
  • Pending A schedule has been created and is ready to run, but is waiting to start.
  • Active- A schedule has been started and it running
  • Updating- If you change schedule, Resource Scheduler creates a work request with the information you have entered. It takes a minute or more for the work request to process the information and update the schedule.
  • Deleting- A schedule has been deleted by a user and a work request is processing it.
  • Deleted- A schedule has been deleted
  • Failed- If Resource Scheduler finds an error in a schedule settings and stops a schedule from being created, the schedule fails. Errors can include Resource not found, Incorrect time or date format, and blank entries.
  • Enabled When you enable a disabled schedule, the schedule returns to its previous state, such as Pending or Active.
  • Disabled When you deactivate a Pending or Active schedule,
  • Ended When a schedule completes its run and stops, the status is Ended. Note that the schedule is also Disabled. You cannot enable an Ended schedule. Edit the schedule and change the end date to a future date.
Action Type Start (default) Select the displayed action to change it from start to stop.

Stop Select the displayed action to change it from stop to start.

Filter Select Filter to display the list with the selected filter.
Reset Select Reset to display the default filter (Creating).
Name The name of the schedule. 1 to 1024 char, all letters (upper and lowercase) numbers, all special characters except line feed, carriage return and NULL.
Resource Criteria

Select Select resources.

Type
  • Database

    (select to expand)

Databases
  • Database 1 OCID
  • Database 2 OCID
  • Database 3 OCID
  • Instance
OCID rx.…
Tag Namespace A-Key1:Value1
View resources Select View resources to see the resources listed by the resource criteria listed above.
Action The last action that ran on this schedule
  • Start
  • Stop
Schedule The selected time interval date and time when the action is set to run, including the hour, minute, and time zone, in UTC time format.
Last run date The latest date and time that the schedule ran, in UTC time format.
Last run The status of the last schedule action.
  • Success means the selected action ran to completion without any errors.
  • Error means that the scheduled action failed. The error details are displayed on the resource details page. The messages are from the Error object returned by the Compute InstanceAction API or the database equal API.
Next run date The next date and time that the Action is scheduled to run, in UTC time format.
(Actions menu) Select to display the list of actions.
  • View details
  • Edit schedule
  • Clone schedule
  • Enable schedule
  • Disable schedule

Select an action to open the relevant window and make needed changes.