I would like to get the Observatory data every hour they update the forecast.
My one time data extract code is following.
library(RCurl)
web <- getURL
I think the reasonable course of action is to write a script that does all you want to do (downloading data, cleansing, storing, ...) and than use something like:
... to schedule it - meaning to start it at regular intervals instead of having one R session run and waiting all the time via e.g. Sys.sleep(60*60)
.
You probably could use Sys.sleep()
but it smells like bad code.
Instead, set up a cron job to run your code updating every hour. Then your script is simple, and more robust.