简体   繁体   中英

Deploy Shiny App with a scheduled script

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?

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

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

Worked for me, at least.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM