Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi everyone,
I am using a service which is calling windchill data and then storing it in thingworx local database postgres sql now I want to automate this service on a specific interval so that it will automatically execute after a certain time
what I am thing is using a scheduler thing template but not sure how can I implement it and the Thing on which this service is present already using database template so I can't use two template in a single thing
so please give me a better understanding if anybody's have any Idea.
Thanks and Regards,
Lav.
Hi @LY_10691079 ,
You need to create a separete Scheduler Thing under Scheduler ThingTemplate and need to set the timing for the execution. Then in same shecduler thing you need to create the Subscription& to call the service from the respective database thing which need to execute automatically on scheduled interval time.
Kindly find the link , FYR. If any queries please let me know.
Thanks & Regards,
Arun C
ok let me try and will get back to you
Thanks for speedy reply
Hi I tried to write the subscription but couldn't so please help me to write the subscription
FYI DB Thing name is Test_Thing and service is Test_store_Db service
I have created a scheduler thing and added time interval as well but writing subscription is stuck
so please help me to do so
Regards,
Lav.
Hi @LY_10691079 ,
In Schduler Thing > Create New Subscription and follow the steps below,
Step 1 : Provide the Basic Subscription Info
Step 2: Select the Event Type as Schedule Event for the execution with required inputs if applicable.
Step 3: Call the other entity services into this subscription to execute on the selected event.
Thanks & Regards,
Arun C
is it only or do we have to write some code in the subscription as well?
If it is direct execution of your DB_Thing > DB_Service - You can use the same service by calling in it directly for the auto execution on scheduled time.
the service is on Db thing only but how will I know that my service is executed or not like without writing subscription?
That you can make it in the subcription itself by using logger in above start & end of your DB_service execution or you can use properties to log the execution start & end based on your requirement you can write your logic.