提问人:Hack-R 提问时间:1/20/2017 更新时间:1/20/2017 访问量:382
Windows Server 计划任务(R 脚本)失败 - 日志未提供信息
Windows Server scheduled task (R script) fails - log not informative
问:
我正在尝试通过 Windows Server 2008 任务计划程序安排每周运行一次 R 脚本。
最初我通过以下方式设置任务:taskscheduleR
library(taskscheduleR)
taskscheduler_create(taskname = "twitter_scrape",
rscript = "T:\\HackR\\Folder\\web_sna\\code\\twitter_scheduled.R",
startdate = format(Sys.Date(), "%m/%d/%Y"),
schedule = "WEEKLY")
任务失败,错误代码为 。单击任务的“属性”,然后查看“历史记录”选项卡时,事件指示它已成功完成,但实际上并未完成,如返回状态代码所示。0xc000013a
根据我在网上找到的各种故障排除材料,我尝试更改了几个选项,包括
- 启用“无论用户是否登录都运行”与“以最高权限运行”相结合
- 将脚本的父目录添加到可选的“开始位置”字段
这些选项对结果的唯一影响是将错误代码(上次返回结果)更改为0x1。
任务创建的外部日志文件如下所示:
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.3/twitteR_1.1.9.zip' Content type 'application/zip' length 446306 bytes (435 KB) ================================================== downloaded 435 KB package 'twitteR' successfully unpacked and MD5 sums checked The downloaded binary packages are in F:\temp\RtmpasZDYO\downloaded_packages twitteR installed ^C
当然,脚本在手动运行时运行良好。
答: 暂无答案
评论