Thomas Pujol
2008-May-21 23:51 UTC
[R] automation of R? running an R script at a certain time each night?
I am using R in a Windows environment. I store my data in a Microsoft SQL database that gets updated automatically nightly. Once my SQL db is updated, I wish to automatically run an R "script" Any tips on "good" ways to approach this task? Is there an easy way to "launch" an R script using the Windows or other "scheduler"? Can I have an R-script run every hour, and within the script check to determine if my database is updated, and proceed only if it is updated? [[alternative HTML version deleted]]
Edward Wijaya
2008-May-22 00:19 UTC
[R] automation of R? running an R script at a certain time each night?
You might try cron job under Windows. http://drupal.org/node/31506 HTH. - Edward On Thu, May 22, 2008 at 8:51 AM, Thomas Pujol <thomas.pujol at yahoo.com> wrote:> I am using R in a Windows environment. > > I store my data in a Microsoft SQL database that gets updated automatically nightly. Once my SQL db is updated, I wish to automatically run an R "script" > > Any tips on "good" ways to approach this task? > > Is there an easy way to "launch" an R script using the Windows or other "scheduler"? Can I have an R-script run every hour, and within the script check to determine if my database is updated, and proceed only if it is updated? > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >
davidr at rhotrading.com
2008-May-22 14:11 UTC
[R] automation of R? running an R script at a certain time eachnight?
I do this all the time. See http://finzi.psych.upenn.edu/R/Rhelp02a/archive/105099.html (Vista is a bit harder than XP, but similar.) As far as determining when to proceed with the script, you could have your db updater create a semaphore file your batch or R script could wait for. HTH, David L. Reiner, PhD Head Quant Rho Trading Securities, LLC -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Thomas Pujol Sent: Wednesday, May 21, 2008 6:52 PM To: r-help at stat.math.ethz.ch Subject: [R] automation of R? running an R script at a certain time eachnight? I am using R in a Windows environment. I store my data in a Microsoft SQL database that gets updated automatically nightly. Once my SQL db is updated, I wish to automatically run an R "script" Any tips on "good" ways to approach this task? Is there an easy way to "launch" an R script using the Windows or other "scheduler"? Can I have an R-script run every hour, and within the script check to determine if my database is updated, and proceed only if it is updated? [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org 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.