Discussion Locked

Scheduled task

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi, in win2k, say that I am doing something in the DC then I want it to log off automatically after sometime while after I leave work, I checked the scheduled task but I found nothing relevant there. Is there anyway, I can log off, reboot and shutdown the computer using the scheduled task or even a batch file?
And if batch file is the only way, what to write in it and how to run the batch file (for logging off, rebooting and shutdown) if possible?

5 replies

by timthetoolman

Hi,

There is a coomand you can use...

logoff

Its as simple as that. BUT... you can do this from a scheduled task because it doesn't run in the same context as your logged in process. It would simply log itself off and effectively do nothing.

Check out the following site... It says NT but will be applicable to 2000 as well.

http://is-it-true.org/nt/atips/atips43.shtml

(remove spaces from the above URL)
You'll need to download the Windows 2000 resource kit to get shutdown.exe or you could get it from...

http://crv.mp3car.com/shutdown.html

(again remove spaces...)

Then add a scheduled process to run taht command only with the appropriate switches.

That should work.

Cheers,
Tim.

by timthetoolman

Slight change to my opening line! Should read CANT !! "Its as simple as that. BUT... you cant do this from a scheduled task because it doesn't run in the same context as your logged in process. It would simply log itself off and effectively do nothing."

This discussion is closed to new replies.