Re: [R] automation of R? running an R script at a certain time each night?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 23 May 2008 17:47:58 +0100 (BST)

On Fri, 23 May 2008, Felipe Carrillo wrote:

> Hi:
> Edward, were you able to automate the process? if so,
> do you mind giving me a hint on how you did it? I am
> facing the same problem. I created a batch file which
> it runs fine using the task scheduler but only opens
> Tinn-R and R but it doesn't execute my script.
> My task scheduler executes everyday at 8:00 am
> This is my batch file:
> @echo off
> Start "" "C:\Program Files\R\R-2.7.0\bin\Rgui.exe"
> start "" "C:\Documents and
> settings\Desktop\Software\MyScript.r"
>
> What am I missing?

Rscript[.exe]

You don't want (I presume) to run a GUI to execute a script.

> --- Edward Wijaya <ewijaya@gmail.com> wrote:
>
>> 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.
>>>
>>
>> ______________________________________________
>> 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.
>>
>
>
> Felipe D. Carrillo
> Fishery Biologist
> Department of the Interior
> US Fish & Wildlife Service
> California, USA
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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.
Received on Fri 23 May 2008 - 17:18:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 17:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive