Rule schedule changes via API
AnsweredHi,
We are trying to update rule schedules via the API.
I can see the string requires something like this
"schedule": "fc003ffc003ffc003ffc003ffc003ffc003fffffff",
How do we interpret and manipulate this into a real-world time schedule?
ie enable Monday to Friday 7am to 7pm.
Thanks
-
Hi Ashley Roach,
That is a Hex representation of the binary data.
Each bit defines whether the action should or should not be executed at the hour of each day and week. For example, you have the schedule of a event as follow:

When it is ON, the bit =1, and if it is OFF, the bit =0.
So the binary format of the Monday is as follow.
Then according to the binary(orange), it is interpreted and transformed into HEX presentation(4bits as an HEX number) in the next line. (Red).
You can see the API response of the event, it is matched the interpretation.

Hope this helps. Thanks.
0 -
Thanks Ichiro, Much appreciated.
I'll let you know if we get stuck.0
Please sign in to leave a comment.
Comments
2 comments