我想在特定时间运行 R 代码 [英] I want to run a R code at a specific time

查看:24
本文介绍了我想在特定时间运行 R 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我需要的特定时间运行 R 代码.在这个过程完成后,我想终止 R 会话.

I want to run a R code at a specific time that I need. And after the process finished, I want to terminate the R session.

如果代码如下,

tm<-Sys.time()
write.table(tm,file='OUT.TXT', sep='	');
quit(save = "no")

我应该怎么做才能在2012-04-18 17:25:40"运行这段代码.我需要你的帮助.提前致谢.

What should I do to run this code at "2012-04-18 17:25:40". I need your help. Thanks in advance.

推荐答案

最容易使用 Windows 的 Task Scheduler,或者一个 cron job 在 Linux 下.您可以在那里指定应该在您指定的特定时间运行的命令或程序.

It is easiest to use the Task Scheduler of Windows, or a cron job under Linux. There you can specify a command or program that should be run at a certain time you specify.

这篇关于我想在特定时间运行 R 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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