get online data every hour in R

后端 未结 2 1814
执念已碎
执念已碎 2021-02-09 11:56

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         


        
2条回答
  •  别那么骄傲
    2021-02-09 12:25

    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:

    • Task Scheduler under Windows link
    • Cronjob under Linux link
    • ICal, crontab, CronniX, Maintidget, Macaroni and MacJanitor, Auto Scheduled Task, Launchd Editor, launchctl on Mac link

    ... 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).

提交回复
热议问题