Cron reboot loop (solved)

  • Ive set up a cron for a reboot at 6 am each day. Ive discovered this morning that the box is going into a reboot loop for exactly 1 hour. Ive got the kodi log here 06:58:27 T:140486996547648 NOTICE: special://profile/ is mapped to: special: - Pastebin.com I only noticed this this morning but it shows the last reboot before it stopped at 7 am.

    My cron looks like this:
    * 6 * * * reboot

    My chromebox is rebooting at 6 am like expected. im bothered about this damaging my hard drive as its spinning up and down for an hour for no reason.

    Edited once, last by stuCONNERS (July 2, 2016 at 4:45 PM).

  • Well of course, once the system is rebooted the cronjobs will be activated and as it is still 6 am cron will reboot the device again. This is not a bug but a user error.

    So make this:

    Code
    0 6 * * * reboot


    and it should only reboot at exactly 6:00 am. Depending on how fast it boots it may still reboot twice, but not for a whole hour.

    Edited once, last by Grimson (July 2, 2016 at 12:59 PM).


  • I stil dont understand why * 6 * * * would cause a reboot at 6:45 am, But thanks for the answer cheers

    Because the * is a wildcard, it will match anything. So with the above any minute from 6:00 am to 6:59 am is matched. If you want something to happen at a precise time, you'll need to specify a precise time.