6

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?

zx8754
  • 52,746
  • 12
  • 114
  • 209
  • I feel like there should be a `overwrite` parameter, that is `FALSE` by default. If there isn't one, I think you can ask rstudio about potentially adding it – DeanAttali Nov 06 '17 at 03:47
  • Sorry, in truth I tried the script only locally: with crontab the script works without manually typing "Y". The only issue is install the packages required to make the app work also on your server. – Carlo Andreotti Nov 06 '17 at 14:52

2 Answers2

5

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

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

Worked for me, at least.

dyrland
  • 608
  • 1
  • 7
  • 17
1

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.

waskuf
  • 415
  • 2
  • 4