Hi useR, I am trying to find how to schedule an automatic run of R periodically, I have written some scripts to extract data which are updated monthly on another server, my os is xp. The goal is that my script will run at a scheduled time every month and record the results to some directories. Now the scripts are done, only thing I need is to know how to let R run my scripts at a certain time, say the first Sunday of each months. Could anyone give me some clues? Thanks a million in advance! Best, Leon [[alternative HTML version deleted]]
Just create a batch file, say myproc.bat with the line C:/pathtoR/bin/R CMD BATCH myscript.R and use the Windows task scheduler to schedule your job. (Drag your batch file into C:/WINDOWS/Tasks, change its name if you like, and right click to Properties to schedule it and set other attributes.) HTH, David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Am Stat Sent: Wednesday, July 18, 2007 12:45 PM To: r-help at stat.math.ethz.ch Subject: [R] set up automatic running of R Hi useR, I am trying to find how to schedule an automatic run of R periodically, I have written some scripts to extract data which are updated monthly on another server, my os is xp. The goal is that my script will run at a scheduled time every month and record the results to some directories. Now the scripts are done, only thing I need is to know how to let R run my scripts at a certain time, say the first Sunday of each months. Could anyone give me some clues? Thanks a million in advance! Best, Leon [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Create a .bat file with the commands to execute R BATCH and then create a scheduled task that will run at the desired time to call the batch file. On 7/18/07, Am Stat <amstat2006 at gmail.com> wrote:> Hi useR, > > I am trying to find how to schedule an automatic run of R periodically, I > have written some scripts to extract data which are updated monthly on > another server, my os is xp. The goal is that my script will run at a > scheduled time every month and record the results to some directories. > > Now the scripts are done, only thing I need is to know how to let R run my > scripts at a certain time, say the first Sunday of each months. > > Could anyone give me some clues? > > Thanks a million in advance! > > > Best, > > Leon > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?