how to add a corn job in codeigniter controller?
===

how to delete the jobs automatically while after one month using a corn in php
	

    public function deletejobs()
    	{
    		$qry="select *from fiu_user_jobs where job_posting_date <unix_timestamp(now()-interval 31 day)";
    		$res=$this->db->query($qry)->result_array();
    		foreach($res as $result){
    			$this->db->where('jobid',$result['jobid'])->update('fiu_user_jobs',array('job_status'=>expired));
    		}
    		//exit;
    		redirect(base_url());
    		
    		$this->template->write('title', SITE_NAME);
    		$this->template->write_view('leftcolumn', 'leftcolumn',$data);
    		$this->template->write_view('content', 'Jobs_center/job_center',$data);
    		$this->template->render();
    	}	
  Thanks in advance
