View Single Post
  #11  
Old November 29th, 2007, 01:59 PM
Whitehill's Avatar
Whitehill Whitehill is offline
Registered User
 
Join Date: May 2005
Location: Maine
Posts: 212
Thanks: 2
Thanked 0 Times in 0 Posts
Whitehill is on a distinguished road
I got rid of the log entries. First, remove this line from user whitehill's crontab:
Code:
*/5 * * * * /usr/bin/some_program param1 param2
That is, run the program every 5 minutes every day.

Now, create the file /Library/LaunchAgents/net.home.some.whitehill.plist with contents
Code:
<?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>net.home.some.whitehill</string>
        <key>UserName</key>
        <string>whitehill</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/some_program</string>
                <string>param1</string>
                <string>param2</string>
        </array>
        <key>StartInterval</key>
        <integer>300</integer>
</dict>
</plist>
Then run
Code:
launchctl load /Library/LaunchAgents/net.home.some.whitehill.plist
Wow! Isn't that so much simpler and easier?
__________________
iMac 24" 3.06 Ghz Intel Core 2 Duo, 4 gb, 1 tb
Reply With Quote