问题
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