Automatic shutdown after 15 minutes inactivity

Forum dedicated to computer hardware and software, mobile phones and electronic gadgets.
User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

I figured i'd ask here because i know we got a couple computer experts.

Here's the deal. Like the title says i need to shutdown computers after inactivity. They are network machines in a school, and chances are they will already be logged off and at the login screen.

So what i need is some way to schedule an automatic shutdown, that will work whether or not someone is logged on, and for any user.

I thought of putting a shutdown command in the logout script... but that wouldn't be helpful if people forget to logoff plus it would be really annoying when someone needs to logoff and let someone else on the computer.

Any insight would be appreciated. Thanks Guys!


User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

nvm... figured it out and wrote my own.

If anyone is interested i can share it... if not mods just delete this.

240Knightrider
Posts: 3383
Joined: Tue Jan 13, 2004 6:48 pm
Contact:

Post

Im interested in the script if oyu dont mind. I was going to recommend a program thats Bad*ss but you got it.


User avatar
krazydriver
Posts: 2443
Joined: Thu Feb 08, 2007 5:24 pm
Car: 2002 civic ex, 1993 KA-T 240sx - parting it out...

Post

yeah no prob.Here's what i came up with after a little brainstorming.

@echo offecho @echo off > C:\Windows\endday.batecho shutdown -s -c "I'm saving electricity by shutting off!" >> C:\windows\endday.batschtasks /create /tn "Endday" /tr c:\windows\endday.bat /sc onidle /i 15 /RU SYSTEM

pretty much just creates the endday (end of day) batch file then schedules it to be run after 15 minutes of system inactivity, under the sudo user SYSTEM.

Considering how easy it was to actually setup, i'm surprised it wasn't the first thing i found when i searched google for it. but idk..

any program recommendations are welcome though. The more i know the better


Return to “Computers / Electronics”