title: How to set up a Cron Job Programmatically?
body: <p>Is it possible to setup a CRON JOB Programmatically?  Using PHP with the <code>php_curl</code> extension?  I have the following code:</p>
  
  <pre><code>function wp_cron_control_call_cron( $blog_address ) {
      $cron_url = $blog_address . '/wp-cron.php?doing_wp_cron';
      $ch = curl_init( $cron_url );
      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 0 );
      curl_setopt( $ch, CURLOPT_TIMEOUT, '3' );
      $result = curl_exec( $ch );
      curl_close( $ch );
      return $result;
  }
  </code></pre>
  
  <p>Is there anyway to execute this on a set interval programmatically?  I'm not trying to setup a CRONTAB or anything like that in cPanel manually.  I would like this to be able to be done with actual code, if possible.  Is this possible?  Is there a setting in <code>curl_setopt</code> to do this with?  Or some other way?  Using PHP 5.4.16 if that matters.</p>