Skip to main content
Oct 1, 2020 11:08 AM UTC
Solved

How to write service for assign status for program??

Hello,

            I want to show status of  program starting before 2 hrs and  15 min before if program is start then I want to show status is ON  and after finish program it show me Your program  is expired

I have two use case for assign status for program as below 

1) I want to assign program/Batches  for every day

2) Assign program weekly once or twice programs 

 

 please refer below attachment for better understand and suggest how to write service for assign status for program??

 

Thanks in advance

 

PaiChungAnswer
Oct 1, 2020 6:14 PM UTC
The simple answer is you probably want to use Schedulers/Timers to create events at certain times or at certain intervals to evaluate what time is it currently vs. what your program is scheduled for. Also if a program actually starts, you can toggle a property to track that it is running/off

4 replies

PaiChungAnswer
Oct 1, 2020 6:14 PM UTC
The simple answer is you probably want to use Schedulers/Timers to create events at certain times or at certain intervals to evaluate what time is it currently vs. what your program is scheduled for. Also if a program actually starts, you can toggle a property to track that it is running/off
RM12Author
Oct 5, 2020 12:07 PM UTC

Thanks for your reply, Can you please suggest in detail How do I used scheduler/timer for calculating status and how to bind ? or Is their possible through service if it Yes then how to write service for assign status for program??

 

Oct 5, 2020 1:15 PM UTC

Hello @RM12 

 

Please refer following article for your reference:

 

https://www.ptc.com/en/support/article/CS328097

https://www.ptc.com/en/support/article/CS243376?&posno=2&q=create%20scheduler%20thingworx&source=search

 

Hope it will answer your query.

 

Thanks

Om Dukiya

Oct 26, 2020 8:32 PM UTC

Hi @RM12.

 

If one of the previous responses answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon