日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux期末脚本作业,linux – 使用R Markdown将bash脚本作为Cron作业运行

發(fā)布時間:2024/9/15 linux 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux期末脚本作业,linux – 使用R Markdown将bash脚本作为Cron作业运行 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我想嘗試如何從R markdown文件渲染html,但是從作為Cron作業(yè)運行的bash腳本中渲染.我不知道為什么一切正常,除了作為Cron工作運行.我所做的:

我的腳本是Rstudio的演示腳本

---

title: "test"

author: "sms"

date: "24 maja 2015"

output: html_document

---

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see .

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r}

summary(cars)

```

etc.

這個腳本在Rstudio中沒有任何問題.

接下來我嘗試從終端運行Rmd腳本:

Rscript -e "require( 'rmarkdown' ); render('/home/sms/Dokumenty/R/test.Rmd', 'html_document')"

沒有任何問題.有用.

所以我創(chuàng)建了bash腳本

#!/bin/bash

Rscript -e“require(‘rmarkdown’); render(‘/ home / sms / Dokumenty / R / test.Rmd’,’html_document’)”

并更改了chmod 755 test.sh

也像魅力一樣.

但是當放入Cron文件(管理員和用戶)時:

28 18 * * * sh /home/sms/Dokumenty/R/test.sh

它不起作用

知道我做錯了什么嗎?

總結(jié)

以上是生活随笔為你收集整理的linux期末脚本作业,linux – 使用R Markdown将bash脚本作为Cron作业运行的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。