How can we help?
Print

PowerSchedule

The Pelican Power Control Modules (PM5) support advanced scheduling options which include one-time or recurring run times. This interface allows schedules to be added, modified, or deleted. When retrieving schedules with a “get” request only existing or pending schedules will be returned, historical schedules are not retrievable through the API. If a schedule is added through the API it is tracked as an “External” schedule. There is no restriction on the number of schedules that can be added.

Overlapping Schedules

Any overlapping schedules are automatically merged.

Day boundaries

Schedules cannot cross day boundaries. For schedules that need to cross day boundaries multiple schedules should be created.

"Editable" attribute

The “editable” attribute can be set to “Yes” or “No” for an External schedule (default=No). When set to “Yes” the schedule can be edited by users of the Pelican App. When set to “No” the schedule can only be viewed through the App, but not edited or deleted.

PowerSchedule - Object Attributes

Attribute names are not case sensitive. Attribute values are case sensitive.

Name Values Settable Description
name String No The configured name of the power module output.
serialNo String No The power control module serial number.
scheduleId String Yes The unique ID of this schedule (See Note 1).
title String Yes descriptive label for the schedule.
startDate String Yes The first date the schedule will run in ISO 8601 format.
endDate String Yes The last date the schedule will run in ISO 8601 format.
startTime String Yes The time of day ISO 8601 extended local time format.
endTime String Yes The time of day ISO 8601 extended local time format.
repeat String Yes The frequency the schedule will run (See Note 2).
editable Yes, No Yes Whether users can edit the schedule through the Schedule Dashboard.
origin Internal, External, All No How the schedule was created (See Note 3)
delete Yes Yes Delete the specified schedule entry.

Note 1 (ScheduleID)

ScheduleID is a unique identifier for the schedule. The scheduleID can either be system generated or user provided. When a new schedule is added, if this attribute is not provided, the system will generate a unique scheduleID and return it's value in the reply. Existing schedules can be modified or deleted by including the scheduleID in the request. To delete an existing schedule, the scheduleID must be specified in the selection item and the value must be set to “delete=Yes”. When a scheduleID is provided and it matches an existing scheduleID, the attributes provided in the request will be changed to the newly specified values.

Note 2 (Repeat)

Repeat determines the frequency the schedule will repeat.
Valid values are:

None – (Default) The schedule will only run a single time on the specified startDate.

Daily – The output will be On every day from the startDate to the endDate. If the endDate is not specified, it will run every day into the future.

Weekly(Mo,Tu,We,Th,Fr,Sa,Su) – The output will only be On on specified days during the week. The specific days must be comma separated and contained in parenthesis. Any number of days of the week can be specified and they can appear in any order. At least the first two letters of the day's name must be provided to uniquely identify the intended day of the week.

Monthly - The output will be On one day each month from the startDate to the endDate. If the endDate is not specified, it will run every day into the future. The schedule will repeat on the same day of the month as the startDate. Yearly - The output will be On one day each year from the startDate to the endDate. If the endDate is not specified, it will run every day into the future. The schedule will repeat on the same day of the year as the startDate.

Note 3 (Origin)

Origin is whether the schedule was created through the API (external) or the App (internal). When used during a get request as a select attribute this will filter which schedules are returned. The default is “External”. This can also be requested in the value list to determine the origin of the schedule. Only “External” schedules can be created from the API. Both Internal and External schedules can be modified or deleted through the API.