I have written an R script that pulls some data, performs several operations on it and post the output to a database. I would like this script to run every day at a specific time and I found any way to do this effectively. I am running this script on a Windows machine.
Actually under Windows you do not even have to create a batch file first to use the Scheduler.
1. Open the scheduler: START -> All Programs -> Accesories -> System Tools -> Scheduler
2. Create a new Task
3. Under tab Action, create a new action
4. Choose Start Program
5. Browse to Rscript.exe which should be placed e.g. here: "C:\Program Files\R\R-3.0.2\bin\x64\Rscript.exe"
6. Input the name of your file in the parameters field
7. Input the path where the script is to be found in the Start in field
8. Go to the Triggers tab
9. Create new trigger
10. Choose that task should be done each day, month, ... repeated several times, or whatever you like
Task Scheduler. (source: microsoft.com) |
Actually under Windows you do not even have to create a batch file first to use the Scheduler.
1. Open the scheduler: START -> All Programs -> Accesories -> System Tools -> Scheduler
2. Create a new Task
3. Under tab Action, create a new action
4. Choose Start Program
5. Browse to Rscript.exe which should be placed e.g. here: "C:\Program Files\R\R-3.0.2\bin\x64\Rscript.exe"
6. Input the name of your file in the parameters field
7. Input the path where the script is to be found in the Start in field
8. Go to the Triggers tab
9. Create new trigger
10. Choose that task should be done each day, month, ... repeated several times, or whatever you like
No comments:
Post a Comment