im looking for a way to call a function daily at %H:%M in server.R of a deployed shiny app. using an infinite loop to "watch the clock" is probably a sin and doesnt work. any ideas?
ui.R
library(shiny)
shinyUI(fluidPage("floou", textOutput("foo")))
server.R
library(shiny)
myFunction <- function() {...}
repeat { # same behavior with while (T)
# Sys.sleep(60) # also tried sleeping
if (format(as.POSIXlt(Sys.time(), tz = "GMT"), "%H:%M") == "21:00") {
myFunction() # func not called + rendering blocked -> approach not working
}
}
shinyServer(function(input, output) {
output$foo <- renderText("not rendering with infinite loop")
})