I'm trying to set up
crontab to run a shell script, but for some reason, the script doesn't get executed. I'm on system with OS X 10.8.5.
0 12 * * 1 /absolute/path/to/myscript.sh 0 15 * * 2 /absolute/path/to/myscript.sh 30 10 * * 3 /absolute/path/to/myscript.sh 0 18 * * 3 /absolute/path/to/myscript.sh 30 10 * * 4 /absolute/path/to/myscript.sh
#!/bin/sh cd /Users/me/Documents/targetfile/ && git add . && git commit -m "Added notes for $(date)" && git push -u origin master
The script runs fine when it's launched manually, using a shell, but produces only these entries in Console.app:
launchctl: launchctl: Dubious permissions on file (skipping): /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
I have executed
chmod 777 myscript.sh as well as the error-raising
.plist file, but to no avail.
ls -l /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist outputs:
-rwxrwxrwx 1 root wheel 612 2 Aug 18:57 /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
ls -ld /Library/LaunchAgents
drwxr-xr-x 22 root wheel 748 10 Sep 21:12 /Library/LaunchAgents
I did set up the crontab using root, and I have no idea whatsoever what that plist has to do with the script I'm trying to do.
What's wrong with my setup?