开发者

running an R script in batch mode without the command prompt popping up

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 ir开发者_高级运维ritating 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?


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).


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜