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년 전480회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠