本文介绍了调度 R 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编写了一个 R 脚本,它从数据库中提取一些数据,对其执行多项操作并将输出发布到新数据库.
I have written an R script that pulls some data from a database, performs several operations on it and post the output to a new database.
我希望这个脚本每天在特定时间运行,但我找不到任何有效的方法.
I would like this script to run every day at a specific time but I can not find any way to do this effectively.
谁能推荐我可以查看的资源来解决这个问题?我在 Windows 机器上运行这个脚本.
Can anyone recommend a resource I could look at to solve this issue? I am running this script on a Windows machine.
推荐答案实际上在 Windows 下,您甚至不必先创建批处理文件即可使用 Scheduler.
Actually under Windows you do not even have to create a batch file first to use the Scheduler.
- 打开调度程序:开始 -> 所有程序 -> 附件 -> 系统工具 -> 调度程序
- 创建一个新任务
- 在选项卡操作下,创建一个新操作
- 选择启动程序
- 浏览到 Rscript.exe 应该放置在例如这里:C:Program FilesRR-3.0.2inx64Rscript.exe"
- 在参数字段中输入文件名
- 在开始于字段中输入要在其中找到脚本的路径
- 转到触发器标签
- 创建新触发器
- 选择应该每天、每月、...重复几次或任何您喜欢的任务
- Open the scheduler: START -> All Programs -> Accesories -> System Tools -> Scheduler
- Create a new Task
- under tab Action, create a new action
- choose Start Program
- browse to Rscript.exe which should be placed e.g. here: "C:Program FilesRR-3.0.2inx64Rscript.exe"
- input the name of your file in the parameters field
- input the path where the script is to be found in the Start in field
- go to the Triggers tab
- create new trigger
- choose that task should be done each day, month, ... repeated several times, or whatever you like
更多推荐
调度 R 脚本
发布评论