Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: CRON issue on 10.10 - error (grandchild... vs syslog

  1. #1
    Join Date
    Jan 2008
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    CRON issue on 10.10 - error (grandchild... vs syslog

    Hi all,
    Ive been all over this forum and saw a few similar issue, but not quite what i'm experiencing and no clear fix.

    Since 10.10, a scripts that ive been using for many disto just ain't being launched anymore.

    1) Cron is up and running at boot.

    2) The script that ain't loading is the following in crontab:
    6 9 * * * /home/User/Duplicity/Scripts/Duplicity-Automated-CRON-Script-V2.sh

    3) In SYSLOG I get this message:
    Nov 4 09:06:01 Computer CRON[1892]: (root) CMD (/home/User/Duplicity/Scripts/Duplicity-Automated-CRON-Script-V2.sh
    Nov 4 09:06:01 Computer CRON[1890]: (CRON) error (grandchild #1892 failed with exit status 127)


    Tried uninstalling/re-installing CRON as suggested in one tread, didn't work. Tried a few other suggestions I read on this forum with no luck.

    Thanx alot for your help cause i'm out of ideas now...

    Thx!
    Last edited by SiO-Buntu; November 4th, 2010 at 03:22 PM.

  2. #2
    Join Date
    Aug 2010
    Location
    Wales
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    I think Code 127 indicates a 'command not found error'. So is there a command in the script that is mistyped or something?

    does it run outside of cron ok?
    Perseverance will succeed (usually)
    ubuntu user -32597 - linux user - 526569
    Wireless Info Script
    Blog

  3. #3
    Join Date
    Jan 2008
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    Hi, thx for the quick reply.

    Yes the script works fine if run by itself.
    It dosen't even seems to start trough Cron tought.

    (that that you tell me the CODE 127 is a command not found, I will create a simple script, "hello world" and see if the cron runs it OK)

    Could this be a PERMISSION issue even tought this is run as ROOT?

    Thx
    BRB.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    Redirect the output to a file and check it for errors:

    Code:
    6 9 * * * /home/user/Duplicity/Scripts/Duplicity-Automated-CRON-Script-V2.sh > /home/user/somefile 2>&1
    See list of exit codes here.

    It's probably a matter of not having the full path to each command. Cron doesn't share the same environment as your user account.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Aug 2010
    Location
    Wales
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    What does the script do? and has it ever worked with cron?

    Don't think it's security, it's just getting confused about something
    Perseverance will succeed (usually)
    ubuntu user -32597 - linux user - 526569
    Wireless Info Script
    Blog

  6. #6
    Join Date
    Jan 2008
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    Hi,
    I did a simple test, I set a simple CRON Job:

    49 9 * * * touch /home/User/Desktop/cron-test.txt #Cron test


    It didn't work. Got this message in the syslog:

    Nov 4 09:49:01 Computer CRON[1883]: (root) CMD (touch /home/User/Desktop/cron-test.txt #Cron test)
    Nov 4 09:49:01 Computer CRON[1881]: (CRON) error (grandchild #1883 failed with exit status 1)


    Here are a few other info:

    1) This seems happens only when the computer was rebooted without anyone signed in: Eg: I had the same "touch" cron job scheduled to be lauched while my User was logged in. It worked! (the touch file appeared on my desktop!) It only seem to fail when there are no users logged in.

    Here's the log to prove my point:

    Nov 4 09:56:01 Computer cron[1229]: (root) RELOAD (crontabs/root)
    Nov 4 09:56:01 Computer CRON[4783]: (root) CMD (touch /home/User/Desktop/cron-test.txt #Cron test)


    No errors...
    If no user is logged in, I got the grandchild error...

    Does this help?
    hummm....

    Thx alot! Can't wait to hear from you.

  7. #7
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    Take out the comment.

    Also, use the full path to the program you want to run.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  8. #8
    Join Date
    Jan 2008
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    I removed the comment: Still got the issue:

    1)
    Nov 4 10:04:01 Computer CRON[1799]: (root) CMD (touch /home/User/Desktop/cron-test.txt)
    Nov 4 10:04:01 Computer CRON[1718]: (CRON) error (grandchild #1799 failed with exit status 1)


    2) And there ain't no script anymore, I'm using a simple TOUCH command...
    Ill try using the complete patch to touch (/usr/bin/touch).

    Trying, brb.

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    FYI: Linux is case sensitive - User =|= user
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #10
    Join Date
    Jan 2008
    Beans
    12
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: CRON issue on 10.10 - error (grandchild... vs syslog

    Bad news.
    Even with the full path, I still get the error.

    Cron job = 14 10 * * * /usr/bin/touch /home/User/Desktop/cron-test2.txt

    syslog = Nov 4 10:14:01 Computer CRON[1846]: (root) CMD (/usr/bin/touch /home/User/Desktop/cron-test2.txt)
    Nov 4 10:14:01 Computer CRON[1844]: (CRON) error (grandchild #1846 failed with exit status 1)


    Works ony if my "User" is logged in and the cron job is due...
    But I need this to run even if no user is logged in, like after a reboot.

    Keep the suggestions coming. Thx for your help...

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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