taskscheduleR: R package to schedule R scripts with the Windows task manager
来源:互联网 发布:java 阻塞排查 编辑:程序博客网 时间:2024/06/02 05:04
If you are working on a Windows computer and want to schedule your R scripts while you are off running, sleeping or having a coffee break, the taskscheduleR package might be what you are looking for.
The taskscheduleR R package is available at https://github.com/jwijffels/taskscheduleR and it allows R users to do the following:
i) Get the list of scheduled tasks
ii) Remove a task
iii) Add a task
– A task is basically a script with R code which is run through Rscript
– You can schedule tasks ‘ONCE’, ‘MONTHLY’, ‘WEEKLY’, ‘DAILY’, ‘HOURLY’, ‘MINUTE’, ‘ONLOGON’, ‘ONIDLE’
– After the script has run, you can check the log which can be found at the same folder as the R script. It contains the stdout & stderr of the Rscript.
library(taskscheduleR)<br>myscript <- system.file(
"extdata"
,
"helloworld.R"
, package =
"taskscheduleR"
)<br><br>## run script once within 62 seconds<br>taskscheduler_create(taskname =
"myfancyscript"
, rscript = myscript, <br> schedule =
"ONCE"
, starttime = format(Sys.time() + 62,
"%H:%M"
))<br>## run script every day at 09:10<br>taskscheduler_create(taskname =
"myfancyscriptdaily"
, rscript = myscript, <br> schedule =
"DAILY"
, starttime =
"09:10"
)<br><br>##
delete
the tasks<br>taskscheduler_delete(taskname =
"myfancyscript"
)<br>taskscheduler_delete(taskname =
"myfancyscriptdaily"
)
- When the task has run, you can look at the log which contains everything from stdout and stderr. The log file is located at the directory where the R script is located.
## log file is at the place where the helloworld.R script was located<br>system.file(
"extdata"
,
"helloworld.log"
, package =
"taskscheduleR"
)
Who wants to set up an RStudio add-in for this?
- taskscheduleR: R package to schedule R scripts with the Windows task manager
- New RStudio add-in to schedule R scripts
- matlabr: a Package to Calling MATLAB from R with system
- matlabr: a Package to Calling MATLAB from R with system
- Making fast, good decisions with the FFTrees R package
- Updating R from R (on Windows) – using the {installr} package
- Seeing numbers in Ruby with r attached to the number
- Simpler R coding with pipes > the present and future of the magrittr package
- [R] R package "benchmark"
- Imputing missing data with R; MICE package
- How to deal with Windows Schedule&Task by PowerShell in Win7
- Scheduling R Tasks via Windows Task Scheduler
- Scheduling R Tasks via Windows Task Scheduler
- The reference to entity "characterEncoding" must end with the ';' delimiter. Nested exception: The r
- Scheduling R scripts and processes on Windows and Unix/Linux
- MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to r
- [R] R functions to deal with regular expression
- Supplementing your R package with a Shiny app
- RBM的理解
- 最大流算法模板 挑战程序设计竞赛
- spring整合redis(2)spring操作redis数据
- ReactNative解决白屏问题
- test CSDN
- taskscheduleR: R package to schedule R scripts with the Windows task manager
- 好多“无字证明”都可以旋转一下
- Python 适用于win和Linux的pip加速器
- Oracle之用户管理
- Android 用自签名证书实现https请求
- 考虑用静态工厂方法代替构造器
- 进程的信号量和线程的信号量
- JavaScript HTML DOM详解
- 树莓派 安装QT5