Skip to main content

Reading from the scheduler

Rather than typing each schedule's hours into Friendly names, Delegaris can read them from the scheduler your hosting team uses. The names here then cannot drift from what the scheduler actually does.

It reads, compares with the names already here, and lets you pick which to bring in. Nothing in AWS changes.

Administrators only

This is on Settings > Friendly names, which only administrators can open.

Which schedulers​

SchedulerWhat is readNotes
AWS Instance Scheduler (the AWS Solution)Its DynamoDB configuration table, named like <stack>-ConfigTable-…: every schedule, its periods, its time zone and description, and the tag the scheduler reads (tagname)Periods with weekday rules are read exactly. See below for what cannot be
Systems Manager Quick Setup (Resource Scheduler)Its State Manager associations: the start and stop documents, their cron expressions, and the tag value they targetAssociations run on UTC, so the hours come in on UTC
Home-built (EventBridge, Lambda, cron)Nothing: there is no standard place to read fromType the hours in under Friendly names, and add the scheduler's tag key under Schedule tags

Before you start​

The account must be connected. The scheduler's account has to be one of the accounts under Accounts, even if its machines are elsewhere. See Adding accounts.

The role needs read access. Deploy the member account role in that account with ReadSchedules set to true. That adds read-only permissions:

SchedulerPermissions
AWS Instance Schedulerdynamodb:ListTables, and dynamodb:Scan on tables whose name contains ConfigTable
Systems Manager Quick Setupssm:ListAssociations and ssm:DescribeAssociation

Without them, reading fails with the AWS error and a reminder to deploy the role with ReadSchedules set to true.

Reading the schedules​

  1. Open Settings > Friendly names and press Read from the scheduler….
  2. Choose AWS Instance Scheduler or Systems Manager Quick Setup.
  3. Choose the Account the scheduler runs in, and the Region it is deployed in. That need not be where the machines are.
  4. Press Read schedules.
  5. If more than one Instance Scheduler table is found in that region, choose the Configuration table and press Read schedules again.

The dialog lists what it found, "on the tag Schedule" (or whatever tag the scheduler uses):

ColumnWhat it shows
Value in AWSThe schedule's name: the tag value the scheduler looks for
Shown asThe friendly name. For a new schedule, the scheduler's description, or the value itself
HoursThe periods and time zone read, or Not given if none could be read
HereNew (no name yet), Hours differ (a name exists with different hours), or Already the same

Anything the scheduler defines that Delegaris cannot represent is listed in a note under that schedule.

Schedules that are new or have different hours are ticked to start with. Change the ticks if you like, then press Bring in n schedules. A message says what was added and what was updated.

What bringing them in does​

  • A new schedule becomes a friendly name, named from the scheduler's description (or the value), with the hours read. You can rename it afterwards.
  • An existing name is kept. Only its hours are brought up to date, and its note is filled in from the description if it had none.
  • The scheduler's tag is added to the schedule tags under Settings > Schedules if it is not there already. The message says so: "Schedule is now treated as a schedule tag."

Read again whenever the hosting team changes a schedule; the Here column shows what has changed.

What is read, and what is not​

AWS Instance Scheduler​

  • Each schedule's periods, by weekday, with their begin and end times. A period with no end time runs to the end of the day.
  • The schedule's time zone, or the table's default. If neither is set, or it is not recognised, the time zone under Settings > Schedules applies, and a note says so.
  • A schedule overridden to "running" becomes Always on. One overridden to "stopped" is brought in with no hours.
  • Rules the service cannot represent are shown as notes, and those periods count every week: particular months, particular days of the month, and "the first Monday" style weekday rules.
  • A period named in a schedule but missing from the table is noted and skipped.

Systems Manager Quick Setup​

  • For each tag value, the first start and the first stop association that target it, by the time of day and weekdays in their cron expressions.
  • Times come in on UTC, which is how State Manager runs them. People still see stop and start times on their own clock.
  • If only a stop is scheduled, the hours count from midnight; if only a start, they run to the end of the day. A note says which.
  • Expressions that run only on certain dates are noted and treated as weekly.
  • The tag most of the associations use is taken as the scheduler's tag.

Home-built schedulers​

There is nothing to read. Type each value's hours in under Friendly names, and add the tag key under Settings > Schedules.

What is recorded​

Each import is recorded in Activity as a settings change, with the scheduler, how many names were added and updated, and any schedule tag added.