title: Posting to facebook page with cron php
body: <p>I have a job site where 100 jobs posting daily. i also have a Facebook page. i want to post 10 jobs each hour to My Facebook page with cron jobs.
  I am using the following code to post to Facebook face by accessing the URL Manually. </p>
  
  <pre><code>    &lt;?php
   require_once 'facebook_sdk/src/facebook.php';
  
  // configuration
   $appid = 'xxxxxxx';
   $appsecret = 'xxxxxxx';
   $pageId = 'xxxxx';
   $msg = 'test';
   $title = 'pagetitle';
   $uri = 'http://google.com/';
   $desc = 'description here';
   $pic = 'http://google.com/test/2.png';
   $action_name = 'Go to my site';
   $action_link = 'http://www.google.com';
  
  $facebook = new Facebook(array(
   'appId' =&gt; $appid,
   'secret' =&gt; $appsecret,
   'cookie' =&gt; false,
   ));
  
  $user = $facebook-&gt;getUser();
  
  // Contact Facebook and get token
   if ($user) {
   // you're logged in, and we'll get user acces token for posting on the wall
   try {
   $page_info = $facebook-&gt;api("/$pageId?fields=access_token");
   if (!empty($page_info['access_token'])) {
   $attachment = array(
   'access_token' =&gt; $page_info['access_token'],
   'message' =&gt; $msg,
   'name' =&gt; $title,
   'link' =&gt; $uri,
   'description' =&gt; $desc,
   'picture'=&gt;$pic,
   'actions' =&gt; json_encode(array('name' =&gt; $action_name,'link' =&gt; $action_link))
   );
  
  $status = $facebook-&gt;api("/$pageId/feed", "post", $attachment);
   } else {
   $status = 'No access token recieved';
   }
   } catch (FacebookApiException $e) {
   error_log($e);
   $user = null;
   }
   } else {
   // you're not logged in, the application will try to log in to get a access token
   header("Location:{$facebook-&gt;getLoginUrl(array('scope' =&gt; 'photo_upload,user_status,publish_stream,user_photos,manage_pages'))}");
   }
  
  echo $status;
   ?&gt;
  </code></pre>
  
  <p>It working fine. but i want to post the jobs automatically with corn jobs. how can i do it.
  does anyone have any advice? </p>