diff --git a/TODO.md b/TODO.md index ea6d02d..72dee62 100644 --- a/TODO.md +++ b/TODO.md @@ -9,10 +9,9 @@ - [ ] Verify SCPA Public.xlsx column structure is stable across downloads - [ ] Delete app from shinyapps.io (account: rob-wiederstein, appId: 14173710) -- [ ] Add cron job to run `update_owners.R` weekly inside the rstudio container: - `docker exec rstudio Rscript /home/rstudio/projects/r/stAndrews/data-raw/update_owners.R` - Note: app must reload `owners.rds` after refresh — either restart container or - make app reactive to file changes +- [x] Add cron job to run `update_owners.R` weekly inside the rstudio container: + Runs every Sunday at 11pm via crontab; restarts standrews_shiny after; logs to ~/standrews_update.log + Tested end-to-end 2026-03-09 — 388 owners written, options(timeout=300) required for 87.5 MB download ## Features diff --git a/data-raw/update_owners.R b/data-raw/update_owners.R index cff7d0e..cd7fcf6 100644 --- a/data-raw/update_owners.R +++ b/data-raw/update_owners.R @@ -12,6 +12,8 @@ library(dplyr) library(stringr) library(sf) +options(timeout = 300) + subdivisions <- c( "8120", "8113", "8171", "8195", "8221", "8163", "8240", "8159", "8149", "8110", "8254", "8215", "8143"