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

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Cron Job not running

Discussion in 'Asuswrt-Merlin' started by Goobi, Aug 12, 2018.

  1. Goobi

    Goobi Regular Contributor

    Joined:
    Dec 3, 2015
    Messages:
    93
    Noticed a script I have to run via cron is not executing. Shows up find with cru l but simply never executes. Script works just fine manually.

    I created a simply test job as follows to run every minute:

    cru a test “*/1 0 * * * logger test”

    cru l shows:

    */1 0 * * * logger test #test#

    However it simply does not run. What am I missing? Running 384.6 on 86u.

    Thanks is advance.
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. skeal

    skeal Very Senior Member

    Joined:
    Apr 30, 2016
    Messages:
    1,583
    Location:
    Canada
    There are lots of cron job generators on the net but you don't list the file path to "logger test"
     
  4. skeal

    skeal Very Senior Member

    Joined:
    Apr 30, 2016
    Messages:
    1,583
    Location:
    Canada
    It should look like this as an example:
    Code:
    cru a vpn_warning_remove "* 1 * * * sh /jffs/scripts/vpn_warning_remove.sh"
     
  5. CooCooCaChoo

    CooCooCaChoo Regular Contributor

    Joined:
    Sep 20, 2013
    Messages:
    182
    Did you change the flags on the script so that it can run?

    chmod a+rx /jffs/scripts/*
     
  6. Goobi

    Goobi Regular Contributor

    Joined:
    Dec 3, 2015
    Messages:
    93
    Thanks for the responses. Logger is not a script but the actual logger command so no need to put in the full path. Using this to test cron and rule out some issue with my script which works just fine when ran manually. It’s like cron never triggers the job to run. I have tried restarting crond and cru but no dice.
     
  7. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    5,449
    Location:
    United States
    You do realize that your test command is not set to run every minute, but only every minute from 12:00AM to 12:59AM (hour set to zero)...just checking
     
  8. Goobi

    Goobi Regular Contributor

    Joined:
    Dec 3, 2015
    Messages:
    93
    I am such an idiot. Staring me right in the face. That was it and John, thanks!
     
  9. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    5,449
    Location:
    United States
    Something I say to myself on a regular basis :)
     
    Goobi likes this.
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!