AddSystemPauseTimes function
Syntax
AddSystemPauseTimes(StartDay, StartTime, EndDay, EndTime)
Description
Use the AddSystemPauseTimes function to set when pause times occur on your system by adding a row to the system pause times tables.
A pause time is an interval of time during which the node becomes inactive. When the pause time begins, the node is shut down until the pause time is scheduled to end.
Parameters
| Parameter | Description |
|---|---|
|
StartDay |
Specify a number from 0-6. Values are: |
| Value | Description |
|---|---|
|
0 |
Sunday |
|
1 |
Monday |
|
2 |
Tuesday |
|
3 |
Wednesday |
|
4 |
Thursday |
|
5 |
Friday |
|
6 |
Saturday |
| Parameter | Description |
|---|---|
|
StartTime |
Specify a time, in seconds, since midnight. |
|
EndDay |
Specify a number from 0-6. Values are: |
| Value | Description |
|---|---|
|
0 |
Sunday |
|
1 |
Monday |
|
2 |
Tuesday |
|
3 |
Wednesday |
|
4 |
Thursday |
|
5 |
Friday |
|
6 |
Saturday |
| Parameter | Description |
|---|---|
|
EndTime |
Specify a time, in seconds, since midnight. |
Returns
A Boolean value: True if the system pause time specified was added, False otherwise.
Example
Declare Function SetTime PeopleCode REFRESH_BTN FieldFormula;
Component Boolean &spt_changed;
Function GetSecond(&time) Returns number ;
Return Hour(&time) * 3600 + Minute(&time) * 60 + Second(&time);
End-Function;
/* initialize; */
STARTDAY = "0";
AMM_STARTTIME = SetTime(0);
ENDDAY = "0";
AMM_ENDTIME = SetTime(0);
If DoModal(Panel.AMM_ADD_SPTIMES, MsgGetText(117, 13, ""), - 1, - 1) = 1 Then
If AddSystemPauseTimes(Value(STARTDAY), GetSecond(AMM_STARTTIME), Value⇒
(ENDDAY), GetSecond(AMM_ENDTIME)) Then
&spt_changed = True;
DoSave();
Else
MessageBox(16, MsgGetText(117, 13, ""), 117, 14, "");
End-If;
End-If;