Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:10:16+00:00 2026-06-17T19:10:16+00:00

I am attempting to create a CRON job which points to a function inside

  • 0

I am attempting to create a CRON job which points to a function inside a file in a Code Igniter system I have built.
I have created the CRON job on my CPanel and I have tested it using a simple mail php function inside a file at the root and this works correctly, however, I wish to point the CRON job to a location within my MVC framework and for some reason this does not seem to be working.

Here is the CRON job set up on my CPanel:

0 0 * * 1 wget -q -O /dev/null http://www.urlhere.co.uk/index.php/cron_event/send_reminders

and here is the controller I wish to run. The location of it is in the system/controllers/cron_event.php:

<?php

class Cron extends Controller {

function Cron_event()
{
    parent::Controller();
}


/**
 * The index method just displays an access denied message, as we don't support viewing this module in the browser.
 */
function index()
{
    $this->send_reminders();
    $this->load->view('themes/base/header', array('title'=>"Access Denied"));
    $this->load->view('cron/access_denied');
    $this->load->view('themes/base/footer');


}


/**
 * Updates the PR Online Calendar by sending out email notifications for events that have not yet had them sent out.
 */

public function send_reminders() {
    $to = 'jamesholman@urlgoeshere.co.uk';
    $from = 'bigwavetest';
    $message = 'test';

    mail($to, $from, $message); 
}
}

?>

When I point to this controller the CRON job stops working.
I have a feeling it is because I am not including and requiring the Code Igniter framework files but am unsure.
Does anybody have any ideas as to why this isn’t working?
Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:10:17+00:00Added an answer on June 17, 2026 at 7:10 pm

    In your cron call you put:

    wget -q -O /dev/null http://www.urlgoeshere.co.uk/index.php cron_event
    

    I think it must be:

    wget -q -O /dev/null http://www.urlgoeshere.co.uk/index.php/cron_event
    

    Or:

    wget -q -O /dev/null http://www.urlgoeshere.co.uk/cron_event
    

    If you removed index.php from your URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to create a CustomControl which will have various properties affected by an
While attempting to create a replacement tablespace for USER, I accidentally created a datafile
Im attempting to create a new operator :? on lists, which operates the same
I attempting to create an 800x500 div with four overlapping divs inside the container
I am attempting to create a Backbone.js view based on a Twitter bootstrap-modal, which
Attempting to create an itemgroup for use in a target where the file types
I am attempting to create an application which has a edit text view and
I'm attempting to create a hierarchal menu system in rails. My menu model is
I'm attempting to create a function where I can pass names and values that
I'm attempting to create an ajax function that returns a specific string from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.