Scrit to modify date and hour for Count Down

Hi,
Would someone can help me to modify count down parameters with a script ?
I want to lauch a count down (5 mn) every hour.

To lauch the script every hour, i find this:

sleepOnTheMinute(60)

How I can change content for count down (date, hour) with a script ?

Maybe there is a other solution more easy.

Thanks for your help

Best regards

Christophe

Use httpRequest to do so: you have to prepare a json string like:

{"input-values“: {“API-KEY”: "your-text-value“}}

This string you have to urlencode.

Add it to your endpoint of the layer like this:

http://localhost:8989/api/v1/…/?update=Urlencoded_Json

Pack the URL into httpRequest(), inside the parenthesis.

Attention:
Never use SAVE AS in documents with scripts like this.

Thank you for your help.
I tested http request on a layer with your information
this one works well : httpRequest(http://localhost:8989/api/v1/documents/49656246/layers/D80ADF63-FBC9-456E-8232-5188875047CB/setLive)

For testing I try to modify opacity in the layer:
httpRequest(http://localhost:8989/api/v1/documents/49656246/layers/D80ADF63-FBC9-456E-8232-5188875047CB?update={“input-values”:{“tvGroup_Content__Opacity”:“100”})

If I understood, I need to encode this part {“input-values”:{“tvGroup_Content__Opacity”:“100”} with URL Encode tools

I obtain this string %7B%22input-values%22%3A%7B%22tvGroup_Content__Opacity%22%3A%22100%22%7D

And I replace in origical command :

httpRequest(http://localhost:8989/api/v1/documents/49656246/layers/D80ADF63-FBC9-456E-8232-5188875047CB?update=%7B%22input-values%22%3A%7B%22tvGroup_Content__Opacity%22%3A%22100%22%7D)

It doesn’t work. I’m sure I missed something or I don’t understand correctly your instruction. Can you help me ?
Thank you
Best regards
Christophe