AWS Instance Scheduler

0

Hello everyone!

Hope you can help me with customizing a schedule on AWS Instance Scheduler.

I successfully configured an AWS Instance Scheduler to start and stop my instances on Monday to Friday from 7:00 AM to 8:00 PM and this scheduler is working as expected.

I currently have 5 instances provisioned and tagged to successfully run and stop based on the schedule mentioned above, but one from these 5 instances is required to also run during weekends on a different hour schedule e.g. Saturday from 7:00 AM to 5:00 PM and Sunday from 10:00 AM to 5:00 PM.

I tried modify this from DynamoDB by creating another item under ConfigTable e.g. Weekend1 with period 07:00 to 17:00 and Weekend2 with period 10:00 to 17:00 and tagged the specific instance that will run on weekends but it does not run the tagged instance based on the weekend schedule.

Hoping you can guide me on the right way to configure a different schedule.

Thank you.

質問済み 2年前482ビュー
1回答
0

Hello Bdacebedo,

I understand that you want to schedule the start and stop of your instances but there is one instance that you want to start/stop on weekends. You are currently using the AWS instance scheduler and it is working perfectly fine. However, you would like to customize it based on your scenario.

You are in the right direction of creating a custom schedule in AWS instance scheduler[1]. To add a schedule period for your instance you will modify the DynamoDB table and create two more period for your schedule [2]. Below is a sample JSON code that can be used to set schedule period for Saturday from 7:00 AM to 5:00 PM:

{
  "type": {
    "S": "period"
  },
  "name": {
    "S": "sat-7-5"
  },
  "begintime": {
    "S": "7:00"
  },
  "endtime": {
    "S": "16:59"
  },
  "weekdays": {
    "SS": [
      "sat"
    ]
  }
}

You will do the same when creating the period for Sunday. Then modify your schedule and add the periods you created. For the period described above the schedule will look as follows:

{
  "type": {
    "S": "schedule"
  },
  "name": {
    "S": "schedule-name"
  },
  "timezone": {
    "S": "UTC"
  },
  "periods": {
    "SS": [
      "sat-7-5"
    ]
  }
}

When more than one period is used in a schedule, the Instance Scheduler will apply the appropriate start action when at least one of the period rules is true. For more information, refer to Period Rules.

References:

  1. How to use Instance Scheduler
  2. Schedule definitions
Cebi
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ