I have deployed shiny server with several shiny apps. Each app is used as online dashboard which should be refreshed periodically (e.g. every 2 hours or at 10pm every day) according to my plan.
Now the server code for each application looks like
## server.R
data<-sqlQuery(...)
shinyServer(function(input, output,session) {
...
renderPlotly()
}
The main goal is to refresh the global data which is loaded using SQL every time the server starts without restarting the server itself. I'm not interested in reactive solutions which use reactivePoll or invalidateLater due to the fact that this approach will lead to a multiple queries each time the user refresh the page in browser.
Actually, I'm a bit confused that Shiny doesn't provide any native implementation of such feature. Are there any great workarounds to do this?