Use Java Runtime.getRuntime.exec to do long term tasks

Does someone knows how to run Java Runtime.getRuntime.exec in Cuba platform as a service without getting the Too long request proessing message.
I tried with a sub thread but got same message.

The idea is to run this service every minute 24/7 to render Word or other office document to PDF files on the server

Hi,

Take a look at the Scheduled Tasks feature. Also, you can spawn additional threads in Services if needed. If you start a long running operation from UI - see BackgroundTasks.

@kjell1906 Just a suggestion. They usually don’t invoke Runtime.exec API directly, but use wrapper libraries such as commons-exec: Commons Exec – Apache Commons Exec Tutorial