Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To get started with launchd (instead of cron) you'll want to first create an empty <code>.plist</code> file, for example <code>local.mytask.plist</code> and put it somewhere. <code>~/Library/LaunchAgents</code> is probably a good place. Open that in text editor and copy in the code below</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;KeepAlive&lt;/key&gt; &lt;false/&gt; &lt;key&gt;Label&lt;/key&gt; &lt;string&gt;local.mytask&lt;/string&gt; &lt;key&gt;ProgramArguments&lt;/key&gt; &lt;array&gt; &lt;string&gt;/opt/local/bin/wget&lt;/string&gt; &lt;string&gt;http://someserver/somepage.php&lt;/string&gt; &lt;/array&gt; &lt;key&gt;StartInterval&lt;/key&gt; &lt;integer&gt;300&lt;/integer&gt; &lt;key&gt;RunAtLoad&lt;/key&gt; &lt;true /&gt; &lt;key&gt;StandardErrorPath&lt;/key&gt; &lt;string&gt;/dev/null&lt;/string&gt; &lt;key&gt;StandardOutPath&lt;/key&gt; &lt;string&gt;/dev/null&lt;/string&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>Then "activate" the file from the command line:</p> <pre><code>sudo launchctl load /Users/my_username/Library/LaunchAgents/local.mytask.plist </code></pre> <p>To make it load automatically, create a <code>~/.launchd.conf</code> file with the same line (minus <code>sudo launch</code>)</p> <pre><code>load /Users/my_username/Library/LaunchAgents/local.mytask.plist </code></pre> <p><em>The above instructions above have been copied from <a href="http://www.davidlanier.com/story/cron-and-launchctl-on-mac-os-x-105-leopard" rel="nofollow noreferrer">www.davidlanier.com</a> and reposted here for your reference.</em></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload