Results 1 to 6 of 6

Thread: Cron almost working but not quite...

  1. #1

    Cron almost working but not quite...

    I've installed and set up Cron.

    I've set edited crontabs to append uptime to a file each 5 min.

    if I run 'logread' I get (among many other things) :
    "jan 8 18:25:01 cron[1259]: (root) CMD (uptime >> /opt/etc/crontest.txt)"

    my crontabs look like this:

    */5 * * * * root uptime >> /opt/etc/crontest.txt

    but crontest.txt is empty and nothing is ever written to the file...

    Last edited by n00ben; 08-01-2007 at 18:35.

  2. #2
    The first thing that comes to mind is that you need to set the LD_LIBRARY_PATH to point to /apps/lib since according to your path you'll be running the Asus stock uptime within the optware environment as root.

    Second thing, your filenames are inconsistent (crontest.txt vs crontabs.txt). I'm assuming this was a typo.

    - K.C.

  3. #3
    I added /apps/lib to LD_LIBRARY_PATH in my '.profile' and yes crontest.txt/crontabs.txt was a typo.

    still no luck though. I can manually type the command and it works, and according to logread the command is performed, still no content in crontest.txt though.

    I've set crontest.txt permissions to 777

    EDIT: SOLVED... I just needed to set the full path to 'uptime'... doh

    Last edited by n00ben; 08-01-2007 at 20:17.

  4. #4
    Perhaps the ":" in place of the "=" in your path was the root cause?

    - K.C.

  5. #5
    Quote Originally Posted by kfurge View Post
    Perhaps the ":" in place of the "=" in your path was the root cause?
    nope, that was also a typo (can't copy paste with my current crappy client)

    I had to type the full path to 'uptime' (/opt/bin/uptime), since I forgot to add it to PATH


  6. #6
    Usage example:

    1: Install cron
    "ipkg install cron"

    2: Install text editor
    "ipkg install nano"

    3: Edit crontab file
    "nano /opt/etc/crontab

    4: Change crontab to something like this.
    This will overwrite /tmp/passwd every minute with a costum passwd file.

    MAILTO="" HOME=/
    # ---------- ---------- Default is Empty ---------- ---------- #
    */1 * * * * root cp /shares/MYVOLUME1/MYSHARE1/run/passwd /tmp

    5: Install crontab file
    "crontab /opt/etc/crontab"

    6: Add cron to rc.local

    7: Reboot router

    8: You can check a log to verify crontab.

    Greetings Sollie.
    Last edited by sollie; 10-01-2007 at 08:19.

Similar Threads

  1. unslung cron ipkg problem
    By bubieyehyeh in forum WL-HDD Q&A
    Replies: 4
    Last Post: 06-06-2006, 18:06
  2. cron op wl500/g
    By jozef in forum Dutch Discussion - Nederlands
    Replies: 1
    Last Post: 15-04-2006, 19:03
  3. DHCP not working after firmware upgrade?
    By denny in forum WL-500g Q&A
    Replies: 0
    Last Post: 11-04-2006, 08:52
  4. Replies: 1
    Last Post: 09-12-2005, 22:29
  5. Trying to get IDE working on Oleg's Firmware
    By hugo in forum WL-HDD Custom Development
    Replies: 34
    Last Post: 01-11-2004, 18:06

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts