Menu

#291 Cron job to restart NAS every 10hrs or so?

New
nobody
None
Medium
Defect
2012-08-14
2012-04-03
Anonymous
No

Originally created by: matti.il... (code.google.com)@gmail.com

My snake-os causes transmission service to freeze after about 10 hours of operation. Restarting transmission doesn't help, since it freezes again almost immediately. Only solution seems to be a soft reboot on NAS. I wonder if there's a way to schedule a reboot every 10hrs so I don't need to do this manually?

Discussion

  • Anonymous

    Anonymous - 2012-04-09

    Originally posted by: magn... (code.google.com)@gmail.com

    I have the same problem. the device is frozen every few hours and the only way to makes it work again is by restarting it.
    Is cron the only way? If so, how can I install cron on the sanke-os.
    Thanks a lot!!

     
  • Anonymous

    Anonymous - 2012-05-18

    Originally posted by: arionkra... (code.google.com)@gmail.com

    Fear not, I'm here to help you guys!
    My NAS used to freeze randomly (sometimes it was after a few hours, sometimes it lasted a few days without freezing), and I realized I had to make it reboot every now and then to avoid this issue.
    The simplest solution I came with was to simply add the following cron job:
    0 5 * * * reboot

    You can do that easily with the following command:
    echo "0 5 * * * reboot" >> /etc/cron.d/root

    Now your NAS will reboot everyday at 5:00 AM.
    I have to say that my NAS never froze again after I did this.
    If you flash a new firmware version, be sure to issue the command above again, as it will be erased when you flash.

     
  • Anonymous

    Anonymous - 2012-05-20

    Originally posted by: matti.il... (code.google.com)@gmail.com

    Thanks a bunch, that actually worked!
    Now, my NAS seems to need a reboot every 12 hours, so what line should I type in to make it reboot at 5pm as well?

     
  • Anonymous

    Anonymous - 2012-05-23

    Originally posted by: arionkra... (code.google.com)@gmail.com

    Brotip: don't forget to immediately save changes and restart cron service (issuing the following commands) to make effective the change you made.

    /usr/share/snake/config save
    /etc/init.d/cron restart

    Oh and I would like to thank the guys from the original thread:
    https://code.google.com/p/snake-os/issues/detail?id=243
    They're awesome!

    To make it reboot at 5 PM as well, just issue the following command:
    echo "0 17 * * * reboot" >> /etc/cron.d/root

    For any other schedule configurations, I suggest you to search for cron's syntax on Google. That can be handy sometime.

     

    Related

    Tickets: #243

  • Anonymous

    Anonymous - 2012-06-14

    Originally posted by: matti.il... (code.google.com)@gmail.com

    Awesome, thanks a lot! Now I also understand cron a bit better.

    Too bad the development of this client doesn't seem too active nowadays...

     
  • Anonymous

    Anonymous - 2012-08-01

    Originally posted by: arionkra... (code.google.com)@gmail.com

    After installing pyLoad I couldn't restart my NAS every night; that would cause the running downloads to stop.

    So I tried restarting, every night, only transmission.
    And I've got to say it's working pretty well for more than a month!
    Currently my status page shows "Uptime: 8 d, 32 min", and I have had no problems whatsoever!

    In case you want to try restarting only transmission, as I did, here is the cron job:
    0 5 * * * /opt/etc/init.d/transmission restart

    Don't forget to comment out the previous command (the one that reboots the NAS); you can do that by simply putting a # at the beginning of its line, like this:
    #0 5 * * * /sbin/reboot
    0 5 * * * /opt/etc/init.d/transmission restart

     
  • Anonymous

    Anonymous - 2012-08-14

    Originally posted by: stefansc...@googlemail.com

    Oups.. been meaning to reply here.

    The latest version of the transmission package let's you set up the cron by ticking a checkbox on the service page.

     

Log in to post a comment.

MongoDB Logo MongoDB