Avoid server connect call every minute (datetime component issue)

Hello everyone..
I have a project on NodeJS, with a server connect that has this param:

<dmx-serverconnect id="serverconnect1" 
url="/api/XX" 
dmx-param:time="var1.datetime.formatDate('HH:mm')"

The problem here, is:
Since datetime changes every minute, server connect is called again, because dmx-param:time changes too..

Is there some way of getting datetime (minute interval) and stop it?
Hope made myself clear..

Thanks!

The only way I have done it is to change the datetime setting to a higher period. Usually hours is sufficient or even day. It will still give you the time but won't refresh as often.

1 Like

Thanks @brad but sadly, that doesn't work..
When changing datetime to "hours" it sends 20:00 instead of 20:03 :frowning:
image

image

PS: Convenio and type/day/time, what a mix of language :laughing:

I suppose you could have a Page Flow auto-run to set a variable with the current time, and because it only loads once then the time stays

4 Likes

Hmmm, now I am questioning myself on how I do it. I need to check out one of my projects and see what I have.

Sorry, I thought that is how it worked.

1 Like

Seems it's late here that totally forgot about using a flow
Thanks @Apple that did the trick, thanks @brad too :slight_smile:

1 Like