- if nothing in logfile specified grep through the /var/log/system.log file for your launchd name
This example uses following paths that would need to be changed.
/Users/covard/bsh_scripts
/Users/covard/bsh_scripts/logs
Also need to set the bash script to have execute perm for launchd to run it.
$ chmod +x /Users/covard/bsh_scripts/auto_mysql_backup.sh
To load or unload the launchd file to be run use the following commands (this has to be done anytime the file is changed)
$ launchctl load ~/Library/LaunchAgents/mysql.backup.plist
$ launchctl load ~/Library/LaunchAgents/mysql.backup.plist
To check the status of the agent:
- first column = PID (if currently running)
- second column = status (0 is good, if anything else look at log file)
$ launchctl list | grep mysql.backup
=> - 0 mysql.backup