Skip to main content
1-Visitor
June 27, 2017
Question

schedule thing property?

  • June 27, 2017
  • 3 replies
  • 3527 views

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

    3 replies

    1-Visitor
    June 27, 2017

    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.

    14-Alexandrite
    June 27, 2017

    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

    1-Visitor
    June 27, 2017

    YaY we crossed the answers Your one was more detailed

    14-Alexandrite
    June 27, 2017

    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

    14-Alexandrite
    June 29, 2017

    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