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

Cron jobs that survive a reboot?

Discussion in 'Tomato Firmware' started by StickMonster, Aug 5, 2012.

  1. StickMonster

    StickMonster Networkin' Nut Member

    The other day I scheduled a cron job with cru, and I just discovered it is not there now. My guess is that it didn't survive a reboot.

    Is there something special you have to do to make scheduled jobs survive a reboot? Commit the crontab file to nvram, or put the cru command in a startup script, or something like that?

    What's better and why?

    I'm using Sibby's build on an Asus RT-N16, BTW.
     
  2. koitsu

    koitsu Network Guru Member

    The only way to make this work is to write some small shell script code that goes into Administration -> Scripts -> Init (or Firewall or WAN Up, depending on your needs), that inserts/adds the cronjob in question. There is no "magicall cronjob NVRAM" variable -- the Scripts section is the best you'll get.
     
  3. shibby20

    shibby20 Network Guru Member

    why you dont use scheduler in Administration menu?
     
  4. koitsu

    koitsu Network Guru Member

    As for me, I didn't even know that existed until now! *laugh* :) I have no need for cronjobs on my RT-N16 (I have a FreeBSD box for that), but good to know. Hopefully that'll suffice for StickMonster!
     
  5. StickMonster

    StickMonster Networkin' Nut Member

    Awesome! How long has that been there? I was just thinking that would be a nice feature to have in the GUI :).
     
  6. shibby20

    shibby20 Network Guru Member

    since I can remember :)
     

Share This Page