Deploy Shiny App with a scheduled script

拟墨画扇 提交于 2019-12-07 13:32:32

问题


I have a simple script that in Rstudio works to deploy app:

rsconnect::setAccountInfo(name='xx', token='xx', secret='xx/xx')
library(rsconnect)
deployApp("xxx",launch.browser = FALSE)

After this prompt appears:

Update application currently deployed at https://xxx.shinyapps.io/xx/?

that block my scheduled script.

There's a way to skip this request and update the shiny app without manually type "Y" in the Console?


回答1:


Adding to what waskuf said, try adding forceUpdate = T to your code.

deployApp("xxx", launch.browser = F, forceUpdate = T)

Worked for me, at least.




回答2:


It works if you just write an unquoted Y in your script after the "deployApp" command and run it in one batch. Like this:

rsconnect::setAccountInfo(name='xx', token='xx', secret='xx/xx')
library(rsconnect)
deployApp("xxx",launch.browser = FALSE)
Y

Just make sure the lines including deployApp(...) and Y are both selected and not seperated by any other commands when executed.



来源:https://stackoverflow.com/questions/47128845/deploy-shiny-app-with-a-scheduled-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!