Welcome Guest, Not a member yet? Register   Sign In
Cron job issue - No direct script access allowed
#1

Hi, I'm having trouble getting a cron job to run:

=====


The file that I need the cron to run is located at:
Code:
/home/user/public_html/application/modules/cron/controllers/cron.php

The command for the cron is:
Code:
/usr/local/bin/php /home/user/public_html/application/modules/cron/controllers/cron.php Cron index

The file cron.php contains:
<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Cron extends Front_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('cron_model');
    }

    public function index() {
        $this->check_on_grace_period(); //checks for grace period if passed disable account
    }
}

The error after the cron runs is:
No direct script access allowed

=====

What am I doing wrong?  Any help would be amazing, thanks Smile
Reply


Messages In This Thread
Cron job issue - No direct script access allowed - by window077 - 05-27-2017, 10:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB