安排R脚本 [英] Scheduling R Script

查看:119
本文介绍了安排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 Files \ R \ R-3.0.2 \ bin \ x64 \ Rscript.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 Files\R\R-3.0.2\bin\x64\Rscript.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脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆