Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cron Job赢得了';t在Google计算引擎上运行R脚本_Cron_Google Compute Engine_Rstudio Server - Fatal编程技术网

cron Job赢得了';t在Google计算引擎上运行R脚本

cron Job赢得了';t在Google计算引擎上运行R脚本,cron,google-compute-engine,rstudio-server,Cron,Google Compute Engine,Rstudio Server,按照这些说明,我让R-Studio服务器在Google Compute实例上运行: 当我从这个RStudio服务器打开终端时,我注意到man、ps、vi和cron都不存在 bash: ps: command not found 我的目标是让一个简单的cron作业定期运行R脚本。 我手动安装了cron,其中包括: sudo apt-get update sudo apt-get install cron 但是,我无法让cron运行此测试: cmd <- cron_rscript("/ho

按照这些说明,我让R-Studio服务器在Google Compute实例上运行:

当我从这个RStudio服务器打开终端时,我注意到man、ps、vi和cron都不存在

bash: ps: command not found
我的目标是让一个简单的cron作业定期运行R脚本。 我手动安装了cron,其中包括:

sudo apt-get update
sudo apt-get install cron
但是,我无法让cron运行此测试:

cmd <- cron_rscript("/home/law9723/now_to_file.R")
cron_add(cmd, frequency = "*/1 * * * *", id = "now_to_file", description = "Write now to file every minute")

cmd通过使用这些非常有用的说明,我最终完成了工作:

对与cron相关的所有内容使用绝对路径名是明智的建议

我认为当我用这个命令创建一个vm时,Rstudio服务器所在的沙箱非常小。因此,没有vi,man,cron,ps

gce_vm(template = "rstudio",
             name = "my-rstudio",
             username = "mark", password = "mark1234",
             predefined_type = "n1-highmem-2")

我已成功使用rstudio addin。推荐人是

我还认为,您必须从cron开始

sudo cron start
如在


当我第一次进入GCE的Rstudio时,我安装了shinyFiles、miniUI和cronR软件包,在本地使用了Google Computenginer,就像你一样。然后,“在Linux/Unix上调度R脚本”将出现在外接程序列表中

我知道您正试图通过使用Google Compute Engine的R接口,通过运行cron_add来添加cron作业。您是否收到错误消息?如果是这样的话,你能在这里发布更多的内容吗?谢谢,你好。没有错误消息。我最终用这些指令启动了一个虚拟机: