Home Forums OS X Server and Client Discussion Questions and Answers LaunchD ProgramArguments

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #363306
    mkalien
    Participant

    Am I doing this right?

    If I have a script that takes an argument of a directory path and does actions on that directory, can I use ProgramArguments to specify multiple directory paths? Will the following launch my script multiple times simultaneously? or in order of ProgramArguments?

    <key>Label</key>
            <string>reset-user-permissions</string>
            <key>Program</key>
            <array>
                    <string>/usr/local/bin/reset-user-permissions.pl</string>
            <key>ProgramArguments</key>
            </array>
            <array>
                    <string>/usr/local/bin/reset-user-permissions.pl /Volumes/Users/a</string>
                    <string>/usr/local/bin/reset-user-permissions.pl /Volumes/Users/b</string>
                    <string>/usr/local/bin/reset-user-permissions.pl /Volumes/Users/c</string>
            </array>
            <key>StandardOutPath</key>
            <string>/usr/local/mystuff/logs/scripts.log</string>
            <key>StandardErrorPath</key>
            <string>/usr/local/mystuff/logs/scripts.error.log</string>
            <key>UserName</key>
            <string>root</string>
            <key>StartCalendarInterval</key>
               <dict>
                   <key>Minute</key>
                   <integer>30</integer>
                   <key>Hour</key>
                   <integer>3</integer>
               </dict>
    </dict>
    </plist>
    
    
    
    #363318
    mkalien
    Participant

    So the obvious answer was no. Considering the attribute was called Program ARGUMENTS I should have known but I wasn’t sure. Has anyone run across any in depth tutorials on launchd plists?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed