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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Pujol Sent: Wednesday, May 21, 2008 6:52 PM To: [EMAIL PROTECTED] 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@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. ______________________________________________ R-help@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.