Inside the shiny_preload_data() function, I am querying SQL database every morning, then return a data frame for the Shiny App to consume.
One possible solution is to put this shiny_preload_data() function in the global.R file so that it will run every time my App restart. But that requires restarting my App every morning.
Is there a configuration variable I can turn on to force Shiny Server to trigger the run of shiny_preload_data() function? Essentially I just need a simulation of opening the shiny app URL in a browser. This would trigger this function to run. (I tried curl -X GET . It did not work as this command does not have a javascript engine).
--- Actually put shiny_preload_data() in global.R, then restart the shiny server, won't work. Whatever in global.R still expect the first user to trigger the logic inside. So it not a solution.