warn websession users

I’m using Phillip Zedalis’ great routine for shutting down websessions before uploading a new version. Now I want to give my clients a warning that shutdown is coming.

Ideas please?

Try this one :slight_smile:

  For i as Integer = 0 to App.SessionCount-1
    App.SessionAtIndex(i).MsgBox("People! We're shutting down!")
  next

so I then need a timer in the app so they’ve got 30 seconds to get ready. Tried to put a timer I the app and it wouldn’t let me.

Tried both a webtimer and a timer in the app, but can’t do it.

Is there a timer that isn’t a control so I can put it in the app?

Insert a class into your project, set it’s super to timer then add the action event to the class. Add a property to a module or app with super yourclassname

After running Albin’s code above instantiate the timer with a new statement and off you go.

got 'er thanks much guys

ok … not quite there yet. The app is shutting down far too quickly, maybe 5 seconds at most.

shutdownTimer = new shutdownTimerClass
shutdownTimer.period = 60000
shutdownTimer.mode = timer.modeSingle

app.quit is in the shutdownTimer class

ideas?

[quote=63123:@John Scanlan]ok … not quite there yet. The app is shutting down far too quickly, maybe 5 seconds at most.

shutdownTimer = new shutdownTimerClass
shutdownTimer.period = 60000
shutdownTimer.mode = timer.modeSingle

app.quit is in the shutdownTimer class

ideas?[/quote]

When are you starting the timer running? Make sure you don’t do anything else after that basically. Also, make sure your super is TIMER and NOT WebTimer. TIMER is local to the server, WebTimer is local to the client’s browser.

the super is “timer”. doesn’t shutdownTimer.mode = timer.modeSingle start the timer?