Call function in shinyapps.io during app deployment

I built a function that scrapes data from the web and builds ML models. I want to deploy the output of the function to a shiny app. The function takes about 10 minutes to run so I do not want it to run every time a new instance of the app gets opened, just once per day and then have the output stay in the app between function calls. Is there a way to call a function in shinyapps.io only once during or immediately after app deployment?