Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The list of tag keys that are used to set up instance start/stop:

Key

Description

tz (required)

Timezone to be used by scheduler. Use Area/Location style from IANA Time Zone Database:

Code Block
tz=America/New_York

default (required)


Default instance work hours. Can be either numeric or range with a hyphen separated by the slashes /. It also can be the word off which mean that instance should be stopped all that day or on which mean that instance should be running. The work hours should be specified in 24-hour format.

mon, tue, wed, thu, fri, sat, sun (optional)


Instance work hours for current day. Format is the same as key default.

Example 1. Work hours:

Code Block
default=9-16 sat=off sun=off

Instance will be running from 9:00 to 16:59 all days except Saturday and Sunday.

Example 2. Work hours:

Code Block
default=off wed=9/14-17

Instance will be running only on Wednesday from 9:00 to 9:59 and from 14:00 to 17:59.

policy (optional)


Scheduler mode. Can be start_at_time or stop_at_time which mean that the scheduler will check and change instance status only at time defined with keys default and mon .. sun.

Learn more about tagging resources in Cloudaware here.

Tag Examples

Code Block
tz=America/New_York default=9-17 sat=9-11/15-17 sun=off tz=America/New_York 

Description:

...

  • New York (EST);

instance work hours

  • from Monday to Friday: 9:00-17:59;

  • Saturday: 9:00-11:59 and 15:00-17:59;

  • Sunday: completely off;

schedule timezone

  • New York (EST);

Use the 'default=off' to specify work hours for an instance. The instance will be off all time, except for specific time periods, for example:

Code Block
default=off wed=0-5 tz=America/New_York 

Description:

instance work hours

  • Wednesday: 00:00-5:59;

schedule timezone

  • New York (EST);

This configuration below can be used for instances to operate from 8 AM to 6 PM on weekdays, remain off during non-working hours, and also off on weekends:

Code Block
mon=8-18 tue=8-18 wed=8-18 thu=8-18 fri=8-18 sat=off sun=off default=off 

...

tz=America/New_York

Description:

instance work hours

  • from Monday to Friday: 8:00-18:59;

  • Saturday-Sunday: off

schedule timezone

  • New York (EST);

You can implement a sophisticated scheduling pattern when configuring instances with operational requirements that cross midnight. For example, to have an instance

...

operate from Monday through Friday, running from midnight to 2 AM and again from 10 PM to midnight, use the following schedule configuration:

Code Block
mon=0-2/22-24 tue=0-2/22-24 wed=0-2/22-24 thu=0-2/22-24 fri=0-2/22-24 sat=off sun=off default=off tz=America/New_York

Description:

instance work hours

  • from Monday to Friday: 0:00-2:00 and 22-0-00;

  • Saturday-Sunday: off

schedule timezone

  • New York (EST);

This approach allows for precise control over resource utilization and cost management.