0

I have a Shiny application that needs to load into memory some fairly large data sets. To save the users some time when browsing to the dashboard, I set the app_idle_timeout to zero (using the community version of the Shiny server application), as suggested in the docs. This works as expected.

However, the underlying data needs to be refreshed daily. Hence, what I would like to do is setting up a cron job that reboots the shiny server (or stops the relevant sessions) every day at 3am and then automatically initiates a new R session so that the data in the global.R is loaded into memory and the dashboard ready to consume instantly.

What I do not understand is how to initiate a particular Shiny application from terminal, i.e. mimic what happens when browsing to the URL of this app on the Shiny server.

Any suggestion would be greatly appreciated.

S-UP
  • 83
  • 1
  • 8
  • The app should start as soon as someone connects to it, you should probably user cron jobs to do a job on the datasets and save it in the directory of the app or insert it back into a database – Pork Chop May 27 '20 at 07:32
  • I already have a cron job that grabs raw data and aggregates it to the minimum level of granularity needed for the Shiny app. This data then is loaded in global.R. What I need is a way to make the first initialization so that the global.R is loaded and other users can connect to the app without the need to re-load session data. – S-UP May 29 '20 at 07:40

0 Answers0