About Resource Scheduler
Oracle Cloud Infrastructure Resource Scheduler is an Oracle Cloud Infrastructure (OCI) cost management service that you can use to reduce the costs of resources in your tenancy by automatically stopping them when they're not needed, and automatically restarting them when they are needed again.
Oracle Resource Scheduler can reduce the cost of your database and compute OCI cloud resources by stopping them when they are not needed, and restarting them when they are needed again. This service creates a fully automated Auto-Stop/Start scheduling function that acts on the resources across an entire tenancy with any schedules that you create.
You can use the Console, CLI, or API to create and manage schedules that perform actions on a collection of on-boarded resource types so that their lifecycle and operating times are managed to minimize their operating costs.
The Resource Scheduler service is integrated with Oracle Cloud Infrastructure Identity and Access Management (IAM) service, providing easy authentication with native Oracle Cloud Infrastructure identity functionality.
When implemented, the automated management sets the state of resources as needed to effectively manage resources such as those used for testing, development, and demonstration, and reduce costs when using the OCI cloud.
Resource Scheduler supports only compute instances and autonomous databases. It might support other resources in future releases.
Benefits
Resource Scheduler helps you:
- Save money. Creating a schedule to stop a resource when it is not needed pauses billing for Standard Compute shapes, Autonomous Database and Base Database. This reduces the cost of your resources.
- Efficiently manage your resources. The fully automatic Start-Stop functions provide best practices to manage your resources and use them only when needed. Resource Scheduler effectively manages usage of short term resources such as those used for testing and development, and reduces costs when using the OCI cloud.
Examples:
- Using Resource Scheduler, a tenancy admin can create a schedule to stop a set of local resources at 5 PM when employees go home and automatically restart them at 8 AM the next morning when the employees return to work. This reduces consumption by 16 hours per day and cuts operating costs by almost 67% per day over letting the resources run 24 hours a day. The tenancy admin can also stop the resources during the weekend, so that the resources do not incur any costs during that time.
- Tenancy admins can create a set of test resources and automatically schedule them to start at specific times, and then automatically stop them when they are no longer needed. Test and demonstration resources would fall into this category.
How Resource Scheduler Works
Resource Scheduler uses a set of APIs to create work requests that complete specific tasks such as creating, updating, starting, stopping, enabling, disabling, and deleting schedules. During each operation, Resource Scheduler displays the status of the schedule.
How Schedules Work
When Resource Scheduler is enabled, it continuously reads the schedules that you have created. It takes the actions specified in the schedules at the times you have set, on the resources that you have selected. You can create any number of schedules that affect the state of the resources in the tenancies that you specify.
Using Resource Scheduler, you can manage the state of your resources with the Console, REST API, and CLI. Using these tools, you can create, change, start and stop the schedules to best match your needs and tailor the use and costs of your resources.
Status | Operation |
---|---|
Creating | The schedule status while you creates a schedule. Resource Scheduler creates a work request with the information you have entered. It takes a minute or more for the system to process the information and create a schedule. |
Failed | The schedule status if Resource Scheduler finds an error in a schedule setting and stops a schedule from being created. Errors can include “Resource not found,” “Incorrect time or date format,” and blank entries. |
Pending | The schedule status when a schedule is ready to run, but has not started yet, |
Enabled | The schedule status when a schedule has started and is running. |
Ended | The schedule status when a schedule completes its run and stops, the status is Ended. When a schedule ends, it is also disabled. To enable the schedule, you must first update it and change the end date to a future time. |
Updating | The schedule status while Resource Scheduler updates a schedule. If you change a schedule, Resource Scheduler creates a work request with the information you have entered. It takes a minute or more for the system to process the information and update the schedule. When the updates to a schedule are complete, the status depends on whether the schedule is waiting to start or is running. |
Disabled | The schedule status after you disable a pending or enabled schedule, The schedule does not run, even if the start time has passed. |
Enabled | The schedule status after you enable a disabled schedule. |
Example Schedules
Here are some examples of how you can use Resource Scheduler. In these schedules, you would enter a schedule name, the schedule time, the action to take, the resource definition, and the name of the compartment, tenancy, or region,
- Start a database at 8:00 AM on a specified date
- Start a specific compute resource at 8:00 PM every weekday
- Stop the same compute resource at 5:00 PM every weekday
- Stop all demo compute instances on the last day of the month.
-
Stop all resources on a specific day in the future, for example stop resources on May 1.
Using the Resource Scheduler CLI and API
To use any of the Resource Scheduler API functions, you must be authorized in an IAM policy. If you are not authorized, contact the administrator. If you're an administrator who needs to write policies to give users access, see Managing Identity Domains.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI
Using the API and CLI with different operating systems
Windows:
- Before using Windows, you must install Git Bash for Windows and run commands with that tool.
- To get the key's fingerprint, use the following OpenSSL command:
openssl rsa -pubout -outform DER -in \.oci\oci_api_key.pem | openssl md5 -c
- In Windows, to pass complex input to the CLI as a JSON string, you must enclose the entire block in double quotes. Inside the block, each double quote for the key and value strings must be escaped with a backslash (\) character.
- When you upload the public key in the Console, the fingerprint is also automatically displayed there. It looks something like this: 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef
Linux and Mac OS X:
To get the key's fingerprint, use the following OpenSSL command:
openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c