Linux Index

Auto-shutdown


Suppose you want to shutdown your computer automatically at a fix time every day, let's say around 5 o'clock. But if somebody is working on the computer at this time it would be polite to ask him if he wishes to delay the auto-shutdown.

The tcl script shutdown.tcl will start a count-down of 15 minutes at 5 o'clock. If there is no user reaction in this time, a external program is called to execute shutdown. On a Unix platform, this external program will be "/sbin/shutdown" and on a Windows platform, this external program will be "C:/shutdown/shutdown.exe".

If you use a Windows platform, the steps to be followed are:

  • Install Tcl if needed
  • Make a directory named "C:/shutdown"
  • Copy the script "shutdown.tcl" in this directory
  • Download shutdown.exe at http://www.easycash.co.at and place this file in the directory "C:/shutdown"
  • Optionally, setup the shutdown.tcl script as to be executed automatically when you login. See end of chapter "Documents database".
  • Optionally, setup your login as auto-login. See end of chapter "Documents database".