# Power Scheduler

## Overall

In Power Scheduler page, User can schedule power status of target cloud resources.&#x20;

Power Scheduler page offers listing scheduler information, add/update/delete scheduler.

## Prerequisites

User need to define security policy(IAM) before setup power scheduler.&#x20;

Before creating Power Scheduler modify your existing policy, For detailed process refer to link below.

{% content-ref url="/pages/-MKn0BI6ZW1eTffrTBd7" %}
[(AWS) Service Account Policy Management](/user-guide/identity/service-account/service-account-policy-management.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MT0PAE1Bq4VwnNH7EEK" %}
[(Google Cloud) Service Account Policy Management](/user-guide/identity/service-account/google-cloud-service-account-policy-management.md)
{% endcontent-ref %}

## Power Scheduler Dashboard

![](/files/-MUBnI9OpLnObPi4I8XL)

**Scheduler list by Projects**

User can see Overall status of power scheduling&#x20;

**Search Bar**

User can search status of power scheduling by project name.

**Scheduling Widget**

Items of power scheduler information for each projects are below.

![](/files/-MUBoi_P5KCOnuOv-4PF)

| Item                   | Description                                                                                                                                                                                                                                   |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Project Name           | Name of projects which is linked to power scheduler                                                                                                                                                                                           |
| Number of Resource     | <ul><li>Number of resources  : Number of resources that are controlled by power scheduler.</li><li>Number of resources available : Total number of resources can be scheduled by power scheduler (Server, RDS, Auto Scaling Group).</li></ul> |
| Schedule               | List of running schedule(Up to 3 items)                                                                                                                                                                                                       |
| Estimated Reduced Cost | Reduced cost by power scheduler in last 1 months(US dollar).                                                                                                                                                                                  |
| Scheduled Job          | Length of each schedule                                                                                                                                                                                                                       |

> **Scheduling Meat Map**
>
> The color of scheduling head map has 2 steps. The color shows how long is scheduled job. Each color means below

> ![](/files/-MKYQ8mqaq_nVnHQPCjU)Scheduled time is between 0 \~ 12 hours

> ![](/files/-MKYP_ZAnO_MZNqtWPh7)Scheduled time is between 12\~24 hours

## Scheduler Management

### Scheduler Calendar

In scheduler Calendar, User can manage this functions

#### Scheduling Time

![](/files/-MUBp_cbWWQ29QNUDbbI)

User can see scheduler timetable. x-axis is date, y-axis is time to be controlled. By clicking ***This weeks*** jump to power scheduling plan for this weeks.

Move to next/previous weeks by  `< >` buttons right upper side of table.

#### Resource Group

**• Priority by Resource Group**

![](/files/-MUBrJopBzSafU5F97KH)

Scheduler is consist of several resource group. Each resource group has step defined by priority.

The lower number gets higher priority. The status change of higher priority finishes first. If the target status is ***ON***, higher priority ***Resource Group*** start first.&#x20;

Create/Deleting ***Resource Group*** is done by clicking ***Edit button > + Add Group***. &#x20;

**Resource Groups In Same Priority**

![](/files/-MUBs0m2RQq0FakP_Z4h)

There is sequence of changing status between resource groups in same priority.

Upper position resource group changes first, and Lower position goes second.

***Details of Resource Group***

![](/files/-MUBs8Qde4aDUXqrzgdD)

Detailed status resource group is done by clicking ***Name of Resource Group.***

| Item          | Description                                        |
| ------------- | -------------------------------------------------- |
| Name          | Name of Resource Group                             |
| Resource Type | Type of Resource Group(Instance, RDS, Autoscaling) |
| Target List   | List of Cloud Resources to be controlled           |

###

### Creating New Scheduler

![](/files/-MUBu2taXaabbFDsjp-8)

By Clicking ***Creating New Scheduler*** button, New scheduler editing screen appears.&#x20;

If there is no existed scheduler, Creation screen is auto generated.

To create schedule, fill out several items required.

#### Name

Name of Schedule.&#x20;

Combination of String, Number, '-' is valid. escape character is not available.&#x20;

#### Timestamp

Specifying time for scheduler, x-axis is date, y-axis is detailed time.   &#x20;

Selecting range of times done by click & drag in calendar.

Schedule has two mode.

| Scheduled mode    | State | Description                                                                                                    | color                                                           |
| ----------------- | ----- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| Repeated Schedule |       | Repeated by every weeks. Within selected area, Resources are On, Otherwise(Non selected) resources became Off. | <img src="/files/-MKJR8pusDIqxxXl4Msf" alt="" data-size="line"> |
| One time          | ON    | Event time for specific date. At the selected area, resources became on.                                       | <img src="/files/-MKJQhxHVtpeRZUnMg6G" alt="" data-size="line"> |
| One time          | OFF   | Event time for specific date. At the selected area, resources became off.                                      | <img src="/files/-MKJQsxcOoInCNPbMv0o" alt="" data-size="line"> |

#### Resource Group

Creating resource groups to control.

By ***Creating Resource Group*** button, ***Creating Resource Group Page*** Pops up.

Informations to be specified are belows

| Item          | Description                                                                                                                                                                                                                                              |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name          | <p>Enter <em><strong>Resource Group</strong></em> name. </p><p>Total 128 character is available. </p><p>Name should start with character(not number).</p><p>Name can be a combination of charcter, number, '-' </p>                                      |
| Resource Type | <p>Select resource type. Available list of resource group is belows. </p><ul><li>\[AWS] EC2</li><li>\[AWS] RDS</li><li>\[AWS] Auto Scaling Group</li><li>\[Google] Compute Engine</li><li>\[Google] Instance Group</li><li>\[Google] Cloud SQL</li></ul> |
| Resource List | Target Cloud Resources to be controlled. Selected by search filter.                                                                                                                                                                                      |

Confirm the input information, then click ***save*** button.

### Schedule Deletion

![](/files/-MUBwAA0Z-Mdh3DwH9F7)

By clicking ***Trash Can*** button, Scheduler can be deleted.

### Scheduler Edit

![](/files/-MUBxYihIMGI37Xm9YjO)

| item               | Description                                                                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ |
| Scheduler Name     | By Clicking ***Scheduler Edit*** button right upper of page. Scheduler name can be edited.                         |
| Scheduler Calendar | <p>By clicking Edit button in calendar. One time schedule, Repeated time scheduled can be edited.</p><p></p>       |
| Resource Group     | <p><em><strong>Resource Group</strong></em> can be edited <em><strong>edit</strong></em> button below. </p><p></p> |

## Limitation & Restrictions

Some limitations for power scheduler service are existed, Most of them are inherited from functionality of each cloud providers.

### AWS

Cloud resources which has conditions below can not managed by power scheduler service

* AutoScalingGroup
  * ASG controlled by ***EKS managed group***
* RDS Instance
  * Instance that member of ***replication***
  * SQL Server DB using ***Multi-AZ***
* RDS Aurora Instance
  * Member of ***Aurora global database***
  * Cluster that using ***parallel query feature***
* Reference
  * [AWS DB instance limitation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html#USER_StopInstance.Limitations)

### Google Cloud

Cloud resources has a such a condition that does not support within power scheduler Service&#x20;

* Compute Engine
  * Compute Engine resources may **NOT** turn on/off if selected compute engines are instance of **Instance group**.
  * Categorizing **Instance group**'s compute engine and normal compute engine on the view will be available soon. &#x20;
* Instance Group

  * Only **Stateless** type in Instance Group is valid to turn on/off in power scheduler service because Google Cloud supports autoscaling on **Stateless** type only in Instance Group.  (Refer to[ google.compute.instance\_group](https://cloud.google.com/compute/docs/instance-groups))
  * Minimum number of Instance in Instance group is 1 when instance group scales in(autoscaling) except certain type (Unmanaged Instance Group).&#x20;

{% hint style="info" %}
**Please, be advised that "Instance Group" is working for action Start/Stop as followings**:

* **Valid type:**&#x20;
  * **Stateless** (**Managed**) as mentioned above.

* **Results on Action:**&#x20;
  \*
  * Recommend size is given by Google Cloud from their own statistic
  * **ON :** Scale up to recommend size(count) of Instance group and autoscaling mode is on (Keep scale in/out itself by recommend size if autoscaling mode is on).&#x20;
  * **OFF :** No matter autoscaling mode is on or off, diminish Instance Group to 1 Instance and autoscaling mode is off.
    {% endhint %}

* Action Cycle & status &#x20;

![](/files/-MZD28Z--E2xV7QpKWeH)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spaceone-dev.gitbook.io/user-guide/automation/power-scheduler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
