Please help debug launchd scheduling

Discussion in 'Mac Basics and Help' started by rjalex, Nov 18, 2015.

  1. rjalex macrumors newbie

    rjalex

    Joined:
    Mar 27, 2011
    Location:
    Rome, Italy
    #1
    Dear friends,
    I have a rather simple script which for a couple of years had run flawlessly under launchd.

    I have now updated the script content and verified it is running manually as it should. The script still has the same path, name and permissions.

    Problem is that the script does not get launched by launchd anymore.

    How can I debug what's happening ?

    The shell script with 0755 rights under my regular user directory and have used Lingon as launchd interface to set it up so that it got launched every 10 minutes. It did so flawlessly for many months but now it stopped doing so for reasons I cannot understand.

    If I run manually the very same command line and parameters it does run allright.

    How can I debug this situation ?

    Thank you very much


    MacBook Pro with Retina display, OS X Yosemite (10.10.5)
     
  2. rjalex, Nov 18, 2015
    Last edited: Nov 18, 2015

    rjalex thread starter macrumors newbie

    rjalex

    Joined:
    Mar 27, 2011
    Location:
    Rome, Italy
    #3
    Cannot see any output in /private/var/log/LNSync.log (never created) nor in system.log.
    This is my plist. Can you spot any blatant errors ? (I wish I understood how to keep the indented formatting. sorry)

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>LNGoogleSync</string>
    <key>ProgramArguments</key>
    <array>
    <string>/bin/sh</string>
    <string>/Users/bob/Documents/IBM/lngooglesync/lngsync.sh</string>
    <string>-silent</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceDescription</key>
    <string>LNGoogleSync</string>
    <key>StandardErrorPath</key>
    <string>/private/var/log/LNSync.log</string>
    <key>StandardOutPath</key>
    <string>/private/var/log/LNSync.log</string>
    <key>StartInterval</key>
    <integer>600</integer>
    </dict>
    </plist>

    And from what I see below the RC is 0 so it should work or not a given ?

    roberts-mbp:log bob$ launchctl list LNGoogleSync
    {
    "LimitLoadToSessionType" = "Aqua";
    "Label" = "LNGoogleSync";
    "TimeOut" = 30;
    "OnDemand" = true;
    "LastExitStatus" = 0;
    "PID" = 357;
    "Program" = "/bin/sh";
    "ProgramArguments" = (
    "/bin/sh";
    "/Users/bob/Documents/IBM/lngooglesync/lngsync.sh";
    "-silent";
    );
    };
     

Share This Page