Skip to main content
16-Pearl
March 1, 2018

How to set up and configure Schedulers

  • March 1, 2018
  • 2 replies
  • 12313 views
  • Create a new Thing using the Scheduler Thing Template.
  • The Scheduler Thing will fire a ScheduledEvent Event when the configured schedule is fired. The event is automatically present and does not need to be added manually.

Configuration

 

  • The Scheduler Configuration is quite straightforward and allows for an exact setup of schedule based on units of time, e.g. seconds, minutes, hours, days of week etc. It can be accessed via the Thing's Entity Configuration

image

 

  • Configuration allows for
    • Changing the runAsUser context - in which the Events will be handled. The user will need visibility and permission on e.g. executing Services or depending Things, which are required to run the Service triggered by the Event.
    • Changing the Schedule - in which time the Events will be fired (by default every minute). The schedule is displayed in CRON String notation and can be changed and viewed in detail by clicking on "More". The CRON String will be generated automatically based on the inputs.
      • Schedules can be configured in Manual mode - allowing for full configuration of each and every time based attribute.
      • Schedules can be configured for a specific time Type - allowing for configuration only based on seconds, minutes, hours, days, weeks, months or years.
      • Below screenshots show schedules running every minute and every Saturday / Sunday at 12:00 ("Every Weekend Day").

image

 

image

 

Services

 

  • Scheduler Things inherit two Services by default from the Thing Template
    • DisableScheduler
    • EnableScheduler
  • These will activate / de-activate the Scheduler and allow / disallow firing Events once a scheduled time is reached
  • If a Scheduler is currenty enabled or disabled can be seen in its properites

image

 

2 replies

1-Visitor
October 16, 2020

How can we use scheduler for Industrial Things and their properties?

Do i need to create Service in Scheduler thing and after that assign to Industrial thing? or any other way.

 

Please suggest me i am bit confused while using this scheduler.

14-Alexandrite
December 28, 2020

I follow all the steps and I create one scheduler but please suggest how do I apply scheduler ,how to set up scheduler and how to display??

Rocko
19-Tanzanite
December 28, 2020

How to set up scheduler: This is what is explained above

How to display: There is no other view than what you have in the Composer when you edit the scheduler thing. Not sure what you want to display.

How do I apply scheduler: Create a subscription to the scheduler's "ScheduledEvent". The code in the subscription is executed everytime the scheduler fires the event.

 

14-Alexandrite
December 29, 2020

Thanks for your reply , I want to show before program starting status as "Start in hh:mm:ss" and  if program is start then I want to show status is "ON" and  if that program is finish it will show program status is "OFF" for daily basis for these refer below attachment and please suggest

how do I used scheduler or Timer with above condition and how to write subscription code ??