Problems with bash script, mysql inserts and launchd

Posted by Armands on Super User See other posts from Super User or by Armands
Published on 2012-12-17T16:20:22Z Indexed on 2012/12/17 17:05 UTC
Read the original article Hit count: 301

Filed under:
|
|

========= I am developing a automated system, which consists of 3 parts: mysql, bash and launchd. Bash script takes folders of work related stuff, zips, archives and puts info about them into database that is located on a local MAMP server. Everything works as expected when I run the script from terminal. But when I use Launchd to automatically run this script, it functions without errors and it does not put the values into database.

I've tried to make logs of returned messages, but the logs end up being empty as the command has run the way it was supposed to.

Any help would be appreciated!

.plist contents

<?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>com.adevo.ari.zip</string>

  <key>ProgramArguments</key>
  <array>
    <string>/Volumes/Archive-Plus/B-ARCHIVE-PLUS/ZZ_UTILITY_FOLDER/Compress.sh</string>
  </array>

  <key>Nice</key>
  <integer>1</integer>

  <key>StartInterval</key>
  <integer>120</integer>

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

</dict>
</plist>

I made this .plist file just by searching the web.

© Super User or respective owner

Related posts about bash

Related posts about mysql