Running long tasks (which takes more than 10 hours to finish) on R shiny server?

shiny

#1

I am working on a r shiny app. There is a task in the app which takes like 10 hours to complete. I was testing my app for this task, but the app got disconnected from the shiny server and stopped. Is there a way to run these long tasks on r shiny server?


#2

I think you should have a look at async programming in shiny apps
https://blog.rstudio.com/2018/06/26/shiny-1-1-0/

You'll be able to perform long-running operations in a worker process that runs in the background, or even on remotes cluster.

At then end, I think a task that take 10 hours to complete is not something that should run from a shiny app directly. it should benefits from the proper architecture.
plumber :package: is also an option that will allow you to make your code available as an API that can host elsewhere than your app, but accessible as endpoint by your app. See https://www.rplumber.io/

It is not really an answer but hints toward some solutions that could help.