For that scenario, it gets even easier. I didn't comment on anything specific earlier, because I couldn't remember how to detect "idle" time. But in your situation, you simply execute a trigger that the FE is listening for, so you can warn any active users that maintenance is about to begin...