Yeah you would create an R script that has the code required to update your data file then schedule a cron job to run the script at your chosen time interval on the server.
You can use the
cronR package to do this all in R. To set up the job the code would look something like this:
r <- cron_rscript("update_data.R")
cron_add(r, frequency = "daily", at = "00:00", description = "update data")
You can these use
cron_ls() to check it has registered the job.
To get this new data into your app on shinyapps.io you would need to have something in your
update_data.R script that uploads the updated file to a remote data storage space that you can access and load into your app on launch. Check out the persistent data storage article I linked to previously for examples of how to do this.
I would recommend the
googlesheets package if the data update is only a few additional rows each update, or
googledrive if there is a lot of new data each update or a new data set entirely, because adding data to a google sheet row by row is slow. If you're familiar with setting up remote databases you could try that option.
However, if you host the app itself on the same server your data lives and is updated with cron using shiny server open source or pro, it makes things a bit simpler because you can simply have the app point to your data file on the local system (use
reactiveFileReader if the file updates regularly).
Hope that helps!