i am hosting multple shiny apps with local server and wondering how can the server be stopped at given time point (e.g. 9 pm every day) automatically without any active session. The stopapp function seems to work in shinyServer function only and thus require at least one session.
current code:
observe({
invalidateLater(60000, session = NULL)
if(Sys.time() > as.POSIXct(paste(format(Sys.Date(),"%Y-%m-%d" ), " 21:00:00" ), format = "%Y-%m-%d %H:%M:%S")){
stopApp()
}
})