[R] Schedule R function/Code to run at specific time

Duncan Murdoch murdoch.duncan at gmail.com
Thu Feb 26 20:20:44 CET 2015


On 26/02/2015 2:08 PM, Doran, Harold wrote:
> Is there functionality within R proper, without having to revert to the OS, allowing a function or a portion of an R script to be run at a defined time? My google searches haven't provided much other than one at the link below which relies on an OS.

If you want it to start 1000 seconds from now, use Sys.sleep(1000) as 
your first statement.  You'll have a process sitting there using no CPU 
(but perhaps lots of virtual memory) until the sleeping is done.  Using 
cron is better.

Duncan Murdoch



More information about the R-help mailing list