Skip to main content
16-Pearl
September 25, 2024
Solved

What are the configuration steps needed to run services for continuous 1 hour.

  • September 25, 2024
  • 1 reply
  • 1395 views

I have to automate the services from scheduler to generate 10 reports every week based on the hardcoded 10 inputs in service. Each report generates after fetching data from windchill and it service executes upto 5 minutes to generate one report. In this case the server should be available for 1 hour in backend for the generation of all reports. 

 

What are the configuration steps needed to run services for continuous 1 hour.

Best answer by Rocko

Depends on how you interact with the result.

To test if that is a feasible approach at all, you can do a test by running 10 REST requests against ThingWorx, e.g. with Postman.

If it proves to be a valid approach that does not cause resource congestion, you could try multiple subscriptions.

You could also make the services asynchronous and pick up the result later from a repository.

1 reply

Rocko
19-Tanzanite
September 26, 2024

Not sure what you mean by "server should be available", the server is running permanently and therefore available.

If you have long-running services, you need to set the Scripttimeout parameter in configuration, in your case to 3600. It's documented here:

https://support.ptc.com/help/thingworx/platform/r9/en/#page/ThingWorx/Help/Installation/Installation/platform_settings_json_configuration_details.html

 

Since 3600 is quite high, you could consider running the services in parallel rather than sequential. But it depends on the use case and the load if this is feasible.

 

16-Pearl
October 1, 2024

How can we trigger the services parallelly from backend?

Rocko
Rocko19-TanzaniteAnswer
19-Tanzanite
October 1, 2024

Depends on how you interact with the result.

To test if that is a feasible approach at all, you can do a test by running 10 REST requests against ThingWorx, e.g. with Postman.

If it proves to be a valid approach that does not cause resource congestion, you could try multiple subscriptions.

You could also make the services asynchronous and pick up the result later from a repository.