Windows scheduler question

  • Thread starter Thread starter Demus
  • Start date Start date
D

Demus

Hello all,
I was wondering if there is a way to schedule windows to log off 45 minutes
after logging on?
Trying to limit the kids time on the computer. My first thought was to
create a shortcut to logoff, then use scheduler to run it, but it doesnt
appear you can set the "45 min after logon" in scheduler.
Anyone have any ideas?
 
You could start a bat file with the logon that contains

ping -n 2701 127.0.0.1

to delay for 45 minutes

followed by

shutdown -L

to log them out
 
You could start a bat file with the logon that contains

ping -n 2701 127.0.0.1

to delay for 45 minutes

followed by

shutdown -L

to log them out

So what happens when they kill the batch file?

Even if you successfully log them off, how do you plan on keeping them
from logging back on?
 
Seahawk60B said:
So what happens when they kill the batch file?

Even if you successfully log them off, how do you plan on keeping them
from logging back on?
Why ask me? Ask Demus.
 
Yeah, I thought of using shutdown.exe /s /t 2700 but then if they have
anything open it will ask if they want to save and basically it will give
them an option to not shutdown. Also thought of adding the /c switch but
would hate for them to lose some homework that may be opened.
I guess thats gonna be an issue no matter what.
 
Demus said:
Hello all,
I was wondering if there is a way to schedule windows to log off 45 minutes
after logging on?
Trying to limit the kids time on the computer. My first thought was to
create a shortcut to logoff, then use scheduler to run it, but it doesnt
appear you can set the "45 min after logon" in scheduler.
Anyone have any ideas?

Bob's idea will work nicely when expanded like so:

@echo off
ping localhost -n 2700 > nul
net send %ComputerName% "This PC will shut down 5 minutes from now"
shutdown -s -f -t 300

Use the Task Scheduler to run this batch file at boot time under
the Administrator's account, in order to make it invisible. Note
that "net send" will only work if the Messenger service is running.
 
45 minutes isn't a lot of time allowance to do homework. Maybe you want
to rethink the "software solution" as opposed to the over the shoulder
solution? ;-)
 
Back
Top