1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Scheduled shutdown

Discussion in 'Tomato Firmware' started by trezno, Mar 27, 2008.

  1. trezno

    trezno LI Guru Member

    I have recently installed a Linksys WRT54GL running Tomato 1.17 in my appartment.

    It is possible to schedule a shutdown? I know it's possible to schedule a reboot...

    I'm asking this, because the power outlet to which the router and all my other electronic equipment is installed, automatically cuts the power during the night to save some power (environmentalist freak ;). So I figured that the router would appreciate a controlled shutdown, instead of just loss of power?
  2. der_Kief

    der_Kief Super Moderator Staff Member Member


    within the GUI its not possible ! You have to create a cron job to do a scheduled shutdown. I think the shutdown command will do the trick.

  3. trezno

    trezno LI Guru Member

    How do I setup a cron job?

    I only know how to access the GUI!

    Edit: Can it be added to the startup script?
  4. TexasFlood

    TexasFlood Network Guru Member

    There is a shutdown button on the main menu of my Tomato v1.17 GUI although it can't be scheduled via the GUI. Didn't see a CLI shutdown command but there was a halt command. Halt seems to stop running processes but does not power the router down, or at least there are still lights on. When power cycled, it booted back up as normal. Near as I can tell the GUI shutdown and CLI halt commands do the same thing, or at least visually the router lights seem to behave the same way.

    So if you wanted to run halt every night at 11pm, using cru as recommended on the Tomato web site, under the init section of http://{router name or IP address}/admin-scripts.asp, copy and paste the following, all between, but not including, the []brackets, no line breaks. If you prefer a different schedule, google cron and modify it as needed. The line to schedule halt nightly actually gets added as the router boots so won't happen until after the router is restarted. FYI, when I recently added a command this way via cru, my router failed to come up and re-establish WDS connections on the first boot but booted fine after pulling the power & plugging it back in and subsequent boots have been fine. This might have been a fluke.

    [cru a NightlyHalt "0 23 * * * /sbin/halt"]

Share This Page