julian
julian

Reputation: 43

Launchctl not working / logging after being loaded

Here is my file, I am not getting anything logged, although the loading is apparently successful, as I can see it running with the list command;

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.whtDaily.gexUW</string>

        <key>ProgramArguments</key>
        <array>
            <string>/Users/x/Dropbox/ai/getData.sh</string>
        </array>

         <key>StartCalendarInterval</key>
         <dict>
           <key>Hour</key>
             <integer>22</integer>
           <key>Minute</key>
             <integer>15</integer>
         </dict>

        <key>RunAtLoad</key><true/>

        <key>StandardErrorPath</key>
        <string>/Users/x/Dropbox/ai/logs/daily.err</string>
        <key>StandardOutPath</key>
        <string>/Users/x/Dropbox/ai/logs/daily.out</string>
</dict>
</plist>

I am also not clear if I need to running 'start' after load, or does that happen automatically since I have the 'RunAtLoad' key set to true? I have tried calling start after load, and not with no luck.

This plist file is in the /Library/LaunchAgents directory and I am calling with load and unload with sudo.

Upvotes: 0

Views: 1023

Answers (1)

julian
julian

Reputation: 43

The sh file was not executable.

chmod +x getData.sh 

did the trick.

Upvotes: 0

Related Questions