+ Post New Thread
Results 1 to 4 of 4
*nix Thread, system crontab not running script in Technical; My system crontab looks like this... Code: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to ...
  1. #1
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,548
    Thank Post
    517
    Thanked 56 Times in 50 Posts
    Rep Power
    29

    system crontab not running script

    My system crontab looks like this...
    Code:
    # /etc/crontab: system-wide crontab
    # Unlike any other crontab you don't have to run the `crontab'
    # command to install the new version when you edit this file
    # and files in /etc/cron.d. These files also have username fields,
    # that none of the other crontabs do.
    
    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    
    # m h dom mon dow user  command
    17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
    25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
    */1 * * * * root /usr/local/maharabackup/glpibackup.sh > /var/log/glpibackup.log 2>&1
    */5 * * * * root php /var/www/mahara/cacti/poller.php > /dev/null 2>&1
    * * * * * curl http://localhost/lib/cron.php
    00 12   * * Mon-Sun root /etc/cron.daily/ntpdate
    
    #
    but the line highlighted in red does not run the script. I have set it to once a minute just for testing purposes!

    I have a feeling it may be to do with Path line but not sure what?

    The script runs fine when I call it at the command line.

    Can someone help?

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Out of curiosity, Can you try it with the path line changed this way:

    Code:
    /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
    Steve

  3. Thanks to Steve21 from:

    reggiep (8th July 2011)

  4. #3
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,548
    Thank Post
    517
    Thanked 56 Times in 50 Posts
    Rep Power
    29
    I'll try!

  5. #4
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,548
    Thank Post
    517
    Thanked 56 Times in 50 Posts
    Rep Power
    29
    I'm afraid it didn't help!

SHARE:
+ Post New Thread

Similar Threads

  1. Script not running within GP
    By Stuart_C in forum Windows Server 2008 R2
    Replies: 4
    Last Post: 14th October 2010, 12:24 PM
  2. Login Script not running
    By adamf in forum Windows Server 2000/2003
    Replies: 8
    Last Post: 12th August 2009, 09:59 PM
  3. [Ubuntu] Script not runnning in crontab?
    By reggiep in forum *nix
    Replies: 14
    Last Post: 19th June 2009, 03:23 PM
  4. [Ubuntu] crontab not working
    By Hightower in forum *nix
    Replies: 4
    Last Post: 17th March 2009, 10:24 AM
  5. System clock running very fast
    By MK-2 in forum Windows
    Replies: 23
    Last Post: 8th August 2008, 12:59 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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