google-code-export / feed-on-feeds

Automatically exported from code.google.com/p/feed-on-feeds
GNU General Public License v2.0
1 stars 0 forks source link

LaunchDaemon for MacOS X users (to be used instead of cron entries) #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
MacOS X uses launchd rather than cron. It's still possible to use the latter, 
but you're not really 
supposed to.

For the Mac-users amongst us, here's the launchd file I use, or at least a 
template for it. If you're 
going to use it, you should edit it -- it's a plain text file that you should 
be able to edit in any 
text editor, including TextEdit -- just make sure it doesn't save the thing as 
RTF.

In line 11, you should change the URL to properly reflect your situation.
In line 14, you specify how often this task is run, in seconds. In my example, 
the task is run 
every 10 minutes.

After you're done editing it, save it and tell launchd to use it. There's two 
options:

To run it as "you", only when you're logged in, you put it in 
~/Library/LaunchAgents/ .
You load the file into launchd by opening a Terminal and typing (without quotes:
  'launchctl load -w ~/Library/LaunchAgents/com.feedonfeeds.plist' 

To run it as root, whenever the machine is *on*, you put it in 
/Library/LaunchDaemons/ . The 
Finder will need you to authenticate for that, and yes, you need to have 
Administration rights.
The Terminal command in this case is:
  'sudo launchctl load -w /Library/LaunchDaemons/com.feedonfeeds.plist'

This will ask you for your password.

If you want to change the plist file (because you moved your install, or 
because you want to 
change the timing), you need to unload the file first (launchctl unload -w 
{file}), edit it, and then 
load it again.

Hope this helps anyone.

Original issue reported on code.google.com by doenietz...@gmail.com on 20 Jul 2009 at 8:53

Attachments: