The Subject line of this post is somewhat ambiguous because
it did not mention the phrase "after logout)", hence my question.
What you probably need is this: How can you automatically
shut down a computer at a specific time, provided that nobody
is logged on at that time?
You could do it by creating this batch file:
@echo off
c:\tools\psloggedon.exe | find /i "%computername%" && goto :eof
shutdown -f -t 3
Now use the Task Scheduler to run this batch file every day
at 23:59.
You can download psloggedon.exe from
www.sysinternals.com.