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

Can't get a cron job to work

Discussion in 'Tomato Firmware' started by darksky, Jul 16, 2013.

  1. darksky

    darksky Networkin' Nut Member

    Running Shibby's TomatoUSB on an RT-U66N with optware installed. I installed the cron package with ipkg and have the following in my root user's crontab:

    Code:
    # crontab -e
    */1 * * * * date>/tmp/home/root/date.log
    Cron appears to be running:
    Code:
    # ps | grep cron
      610 root      1576 S    crond
    Nothing gets written to /tmp/home/root/date.log from cron. What am I doing wrong?
     
  2. Monk E. Boy

    Monk E. Boy Network Guru Member

    There's a (limited) version of crond included with Tomato. You would need to stop this default crond daemon and fire up yours in its place for your crond to function.

    In other words, I would guess the crond you see running is the default and not your more functional version.

    Try issuing the following command, to see the path to the executable:
    ls -l /proc/610/exe

    That assumes the crond daemon is still running under pid 610. If you see /bin/busybox at the end of the line, you know that process isn't your crond, and is instead running Tomato's crond.

    For example, one of my router's crond is running under pid 628:
    lrwxrwxrwx 1 root root 0 Jul 16 16:17 /proc/628/exe -> /bin/busybox
     
  3. darksky

    darksky Networkin' Nut Member

    Seems like to the crond's could co-exist to me... I'll just use the Tomato web GUI for now and have removed dixie cron from ipkg.
     
  4. Monk E. Boy

    Monk E. Boy Network Guru Member

    Not sure on that front, every system I've ever used has only had one crond daemon running, so that would be beyond my experience. You can at least figure out if the crond under 610 is your executable or not.
     
  5. rs232

    rs232 Network Guru Member

    Sorry, perhaps not a big help, but for my use I can do pretty much everything with the built in "cru", do you really need the full crontab?
     
  6. darksky

    darksky Networkin' Nut Member

    Thanks for the hint. /usr/sbin/cru is news to me!
     

Share This Page