stopapp without active session?

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()
     }
   })

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.