如何使用节点

时间:2016-04-18 00:50:34

标签: node.js windows batch-file command-line cmd

我有一个机器人,我想要,这个机器人每30分钟重新启动一次。我有一个启动机器人的.batch代码。现在我希望这个机器人每30分钟启动一次。

我有这个:

node bot.js 暂停

1 个答案:

答案 0 :(得分:0)

老学校(并不是很好)的解决方案是:

ans = logical(nrow(dat) - 1L)
for(j in seq_along(dat)) ans[dat[[j]][-1L] != dat[[j]][-nrow(dat)]] = TRUE    
ans = c(TRUE, ans)
#or, the two-pass, `c(TRUE, Reduce("|", lapply(dat, function(x) x[-1L] != x[-length(x)])))`

cbind(dat[ans, ], n = tabulate(cumsum(ans)))
#   x y z n
#1  6 7 A 1
#2  2 5 A 1
#3  3 7 A 3
#6  1 5 A 2
#8  6 7 B 1
#9  5 1 B 1
#10 5 2 B 1
#11 6 7 B 2
#13 5 1 B 1
#14 4 7 B 1
相关问题