Advertisement
VladimirsBudkins

CI Cron example

May 26th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('BASEPATH'))
  4.     exit('No direct script access allowed');
  5.  
  6. class Cron extends CI_Controller {
  7.  
  8.     public function __construct() {
  9.         parent::__construct();
  10.         if (!$this->input->is_cli_request()) {
  11.             die('No access');
  12.         }
  13.     }
  14.  
  15.     public function test() {
  16.         $this->load->model('test');
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement