       Tcron : ATX Power Cron

Tcron integrates 'cron/at' with ATX power-up capability. It is currently
only tested on Mandrake 8.2/9.0/9.1. It should probably work on Redhat. If the
BIOS of your PC doesn't have power-up option, tcron probably doesn't work.

Advantages over the combination of atx power BIOS and a traditional cron:
  1. It can do multiple power-up/down a day;
  2. It can skip some days of a week.
  3. It is easier to use. You don't have to setup both BIOS and cron.
  4. It provides extented format and interface for application programs
     to manage its own tcron entries.

System Requirements:
   1. Motherboard with ATX alarm power-up capability.
   2. Linux Kernel with enhanced /dev/rtc support

Download:
    http://tcron.sf.net

Install:
    0. Check your kernel /dev/rtc support

       a) Character devices -> Enhanced Real Time Clock Support -> 'y'
       b) General setup -> Advanced Power Management BIOS support ->

       rtc may be compiled as module, all you have to do is add 'rtc' to
       /etc/modprobe.preload

    1. make
    2. su as root,  make install.  It will install start-up/shutdown script
       in /etc/rc.d
    3. Reboot to enter BIOS. Change Power Up option to  'Everyday'.
       (My M/B is Asus TUSL2-C)
    4. If tcrond refuses to run, check out /var/log/tcrond.log.
    5. You can view the time of alarm that tcron has set in BIOS.

Usage:
  /usr/bin/tcrontab
      The syntax is the same as vixie cron, except that tcron doesn't support
      names (sun, mon .. jan ..).
      It can also supports 'at' capability in the same file. The expired
      entry will be deleted automatically after system reboot/shutdwon

        # cron job
        43 19 * * 1-6    bin/my-alarm1 ; idle-halt
        # at job, it must begin with a '@', day of week is replace with year
        @ 10 18 5 1 2003 bin/my-tv-record1 ; idle-halt

  /etc/tcron.conf
     1. boot-time :  Please specify how many seconds your PC needs to
        finish the boot. If it is too short, tcrond will miss the cron job.
        Default vaule is 180. For safety, you may want to include the time of fsck,
        if you set the max interval between each check.
     2. halt-cmd : the halt command you want to use, default is /usr/bin/halt
     3. UTC : true or false.  If it is true, the RTC alarm is set as UTC(GMT);
        otherwise it is set as your local time. If you don't know, refer to
        /etc/sysconfig/clock .

  /usr/bin/idle-halt
     Halt only if the system is idle.  Idle-halt checks keyboard and
     mouse in /proc/interrupts.  'idle-halt' executes 'halt' specified in
     /etc/tcrontab. Your user name must be in /etc/shutdown.allow.msec.

Known problems:
        43 19 * * 1-6    bin/My-TV-record ; idle-halt

  1. Tcrond will power up your PC at 19:40 (minus boot-time 3 min) on
     Sunday in the example above; then it will shutdown. Though the
     RTC of M/B supports day of month wake-up, and we know how to
     program it, the CMOS value is checked in the BIOS checksum.
     If it is modified without updating the checksum, the BIOS will
     think it is a CMOS checksum error; and your PC will fail to
     boot. We have to know the checksum functions of different
     BIOSes, which is too difficult.

  2. The current approach has another problem. If you happend to turn
     on your PC at 19:40 on Sunday, tcrond will shutdown the system
     immediately after the boot is finished.

  3. Tcron programs the RTC only on normal shutodwn/reboot.
