SchdSpecialItemAddRange
- Last UpdatedFeb 19, 2024
- 1 minute read
The SchdSpecialItemAddRange function adds a range of special days in the specified special day group (category).
This function is a blocking function. It blocks the calling Cicode task until the operation is complete.
Syntax
INT SchdSpecialItemAddRange(STRING Cluster, STRING GroupID, STRING Name, TIMESTAMP FirstDay, TIMESTAMP LastDay)
Cluster:
The name of the cluster.
GroupID:
The ID of the special day group.
Name:
The name of the special day.
FirstDay:
The first day of the special day range as a timestamp. Use TimestampCreate or StrToTimestamp Cicode functions to get a timestamp data value. When creating a timestamp, please use midnight of the required day.
LastDay:
Last day (inclusive) of the special day range as a timestamp. Use TimestampCreate or StrToTimestamp Cicode functions to get a timestamp data value. When creating a timestamp, please use midnight of the required day.
Return Value
0 if successful, otherwise an error code is returned.
Related Functions
SchdSpecialItemDeleteRange, SchdSpecialItemModifyRange
Example
// Add the special day range for group id 1
// 2018-05-06 : 2018-05-10
SchdSpecialItemAddRange("Cluster1", 1,
TimestampCreate(2018,5,6,0,0,0,0,0), TimestampCreate(2018,5,10,0,0,0,0,0);