cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

schedule thing property?

jshah-3
1-Visitor

schedule thing property?

I wish to set the property of a thing based on time

for example

if time is between 2pm and  3pm the property value should be 50

if it is between 5pm and 6pm  property value should be 75

How can I achieve it?

Thank you for any reply

5 REPLIES 5

You need to create a Thing based on a Timer or Scheduler Template and subscribe to Timer/Scheduler trigger event, there you can set the other Thing's property to 50 and/or 75 based on timestamp.

On your use case, you can set a Scheduler thing which triggers every exact hour, and depending on the timestamp setting the corresponding property on the other thing.

AnnaAn
14-Alexandrite
(To:jshah-3)

Jugal Shah​,

One possible solution would be to create a Scheduler Thing, and you could set time period as every 1 hour like

Then you will create a Subscription and use the Scheculder to be the trigger event, and then you could author your code like:

var date=new Date();

var hour=date.getHours();

// then you could set your property values here...

Hope this helps,

Br,

Anna

YaY we crossed the answers Your one was more detailed

AnnaAn
14-Alexandrite
(To:CarlesColl)

Aha this usually happens

Thanks for answering the customer's questions.

It's really a good thing that our dear customers give great ideas/suggestions to each other!

please keep on to give us and our customer more good ideas Carles Coll

Cheers,

Br,

Anna

AnnaAn
14-Alexandrite
(To:jshah-3)

Dear Jugal Shah​,

Does your issue resolved? if so please mark correct answer or post your correct answers here and we could close  this thread

Thanks,

Br,

Anna

Announcements


Top Tags