Schedules

A Schedule is a named, reusable weekday-and-time schedule shared by scheduled resources across a Site.

List Schedules

Command

files-cli schedules list

Output

Outputs a list of Schedule objects according to the output format.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

files-cli schedules list

Show Schedule

Command

files-cli schedules find

Output

Outputs a Schedule object according to the output format.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Flags

FlagDescription
--id=
int64
Required
Schedule ID.

Example Request

files-cli schedules find \
  --id=1

Create Schedule

Command

files-cli schedules create

Output

Outputs a Schedule object according to the output format.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Flags

FlagDescription
--name=
string
Required
Schedule name.
--schedule-days-of-week=
array(int64)
Required
0-based weekdays used by the Schedule. 0 is Sunday.
--schedule-times-of-day=
array(string)
Required
Times of day in HH:MM format (24-hour).
--schedule-time-zone=
string
Time zone for scheduled times. If not set, times are interpreted as UTC.
--holiday-region=
string
Optional holiday region on which linked resources do not run.

Example Request

files-cli schedules create \
  --name="Weekday overnight" \
  --schedule-days-of-week="[1,2,3,4,5]" \
  --schedule-times-of-day="["01:00"]"

Update Schedule

Command

files-cli schedules update

Output

Outputs a Schedule object according to the output format.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Flags

FlagDescription
--id=
int64
Required
Schedule ID.
--name=
string
Schedule name.
--schedule-days-of-week=
array(int64)
0-based weekdays used by the Schedule. 0 is Sunday.
--schedule-times-of-day=
array(string)
Times of day in HH:MM format (24-hour).
--schedule-time-zone=
string
Time zone for scheduled times. If not set, times are interpreted as UTC.
--holiday-region=
string
Optional holiday region on which linked resources do not run.

Example Request

files-cli schedules update \
  --id=1 \
  --name="Weekday overnight"

Delete Schedule

Command

files-cli schedules delete

Output

No output is returned.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Flags

FlagDescription
--id=
int64
Required
Schedule ID.

Example Request

files-cli schedules delete \
  --id=1

The Schedule Object

Some of the commands above return a Schedule object. The attributes of this object are listed below.

AttributeDescription
id
int64
Schedule ID.
name
string
Schedule name.
schedule_days_of_week
array(int64)
0-based weekdays used by the Schedule. 0 is Sunday.
schedule_times_of_day
array(string)
Times of day in HH:MM format (24-hour).
schedule_time_zone
string
Time zone for scheduled times. If not set, times are interpreted as UTC.
holiday_region
string
Optional holiday region on which linked resources do not run.
human_readable_schedule
string
Human-readable Schedule description.
created_at
date-time
Creation time.
updated_at
date-time
Last update time.