running an R script in batch mode without the comm

2019-05-02 20:16发布

I have a scheduled task (using SCHTASKS) to run every minute.

SCHTASKS /Create /SC MINUTE /MO 1 /TN READSCALE /TR "Rcmd BATCH --vanilla --slave q:\workspace\waga\readScale.R"

On each run command prompt window pops up. It's slightly irritating and perhaps a potential health hazard for people with epilepsy. In Java, one can use javaw.exe (see this thread) that doesn't pop up a command prompt. Is there an equivalent for R?

2条回答
狗以群分
2楼-- · 2019-05-02 20:18

Kudos to serverfault.com, where some people solved the problem using no external tools at least in two ways. Here's the thread.

First is to write a .vbs script. This requires some knowledge of this scripting language and may not be appropriate for everyone.

The second method is to run the task (as I'm doing) under SYSTEM (and not the currently logged in user).

查看更多
Emotional °昔
3楼-- · 2019-05-02 20:18

Ah, Windows... There is a tool called hstart which may help here.

查看更多
登录 后发表回答