I am working on an application using shiny, as part of my project I need to scrape some data from a website on a daily basis.
Is it possible to schedule a job to be done every 12 hours, using cron or a similar utility?
I am using the free shiny server hosting server
I really don't recommend doing this in shiny. Yes, invalidateLater is meant to schedule a reactive to be run again later , but your usecase is abusing that function. Also, a single shiny app session is not meant to be running 24/7, it will likely die between those 12 hours.
You should probably use a cronjob (the cronjob can call an R script, that's 100% legitimate)
There is a specific method within Shiny doind exactly that:
invalidateLater
See also http://shiny.rstudio.com/reference/shiny/latest/invalidateLater.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With