Listing Schedules
This topic explains how to list existing schedules with the Console, CLI, and API, and describes the information in a schedule.
Authentication and Authorization
This page describes the Identity and Access Management IAM process that is used to ensure secure access to Resource Scheduler.
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 Getting Started with Policies. For specific details about writing policies for each of the different services, see the Policy Reference.
Important! To create and manage schedules you must create a policy to give users permission to access and change schedules AND you must create a policy to allow a schedule to manage resources.
For more information, see Authentication and Authorization, Resource Scheduler Policies, and Example Policies.
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'}
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 Getting Started with Policies
To display existing schedules in Resource Scheduler: - Open the navigation menu and click Governance & Administration.
- Under Resource Scheduler, click Schedules. If any schedules in the tenancy that you are logged in to exist, they are displayed in a table as shown in the following example table.
- Optional: Set the filters.
- Click anywhere in the Status field to display the list of statuses. See the Schedule Details table below for the list. Highlight and click the desired status.Note
You can select only one status at a time from the list. - Click anywhere in the Action Type field, and select Start or Stop from the menu.
- Click anywhere in the Status field to display the list of statuses. See the Schedule Details table below for the list. Highlight and click the desired status.
- Optional: Add tags to schedules so that you can list and manage them as a group. See Adding Tags for information and instructions.
- Click Filters to apply the filters you selected.
- Optional: Click the Display Name of a schedule to open the schedule details page for that schedule. See
Example schedules in <compartment name> Status Action Type Filter Reset Example schedules All Last 30 days All Next 30 days Filter Reset Display Name Lifecycle State Schedule Action Resource Criteria Last Run Date UTC time Last Run Status Next run date ⁝ Schedule1 Enabled Every week at 10: 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: 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 Click Creating to display the list of statuses. Highlight and click 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) Click the displayed action to change it from start to stop or from stop to start. Stop
Filter Click Filter to display the list with the selected filter. Reset Click 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 Click Select resources.
Type - Database
(click to expand)
Databases - Database 1 OCID
- Database 2 OCID
- Database 3 OCID
- Instance
OCID rx.… Tag Namespace A-Key1:Value1 View resources Click View resources to see the resources listed preceding. 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 and 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) Click to display the list of actions. - View details
- Edit schedule
- Clone schedule
- Disable schedule
Click an action to open the relevant window and make needed changes.
Adding Tags
You can add tags to schedules so that you can list and manage them as a group. To add a tag to a schedule:
Use the List Schedules CLI command and required parameters to list schedules
Command oci resource-scheduler schedule list --all, --compartment-id | -c, --display-name, -? | -h | --help, --schedule-id oci resource-scheduler schedule list --all, --compartment-id | -c, --display-name, -? | -h | --help, --schedule-id
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Use the Resource Scheduler ListSchedules API to list schedules. For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.