title: How can I programmatically create a new cron job?
body: <p>I want to be able to programatically add a new cron job, what is the best way to do this?</p>
  
  <p>From <a href="http://drupal.org/node/175106" rel="noreferrer">my research</a>, it seems I could dump the current crontab and then append a new one, piping that back into crontab:</p>
  
  <pre><code>(crontab -l ; echo "0 * * * * wget -O - -q http://www.example.com/cron.php") | crontab -
  </code></pre>
  
  <p>Is there a better way?</p>