Cron jobs dont update automatically

Michael J

Member
I have currently noticed this on the Rebuild Board Totals Counter and Update Views Counters. I schedule them every minute and nothing. Their next run times remain the same. Please help!!!!
 
Did you select "Any" for all fields? Select Any, then Save, and then from the Controls Drop down, click Run (this will update the next run time). I tested this and it runs every minute, :)
 
Hi Lawrence,

Yes all fields are set to "Any". I have already done what you suggested and yes that does update the next run time. However, the next run time remains the same after that - i.e. the cron never runs - and the run time is not incremented.
 
Did you select "Any" for all fields? Select Any, then Save, and then from the Controls Drop down, click Run (this will update the next run time). I tested this and it runs every minute, :)
Sure?

I tried this too, and it DOESN'T update the next run time.
If you check the code, it ONLY verifies the cronjob and runs it;)
PHP:
    public function actionRun()
    {
        $this->_checkCsrfFromToken($this->_input->filterSingle('_xfToken', XenForo_Input::STRING));

        $entryId = $this->_input->filterSingle('entry_id', XenForo_Input::STRING);
        $entry = $this->_getCronEntryOrError($entryId);

        $this->_getCronModel()->runEntry($entry); // TODO: capture output or something more useful

        return $this->responseMessage(new XenForo_Phrase('cron_entry_run_successfully'));
    }

// cronmodel->runEntry:

    /**
    * Runs the given entry if possible.
    *
    * @param array $entry Info about cron entry
    */
    public function runEntry(array $entry)
    {
        if (XenForo_Application::autoload($entry['cron_class']) && method_exists($entry['cron_class'], $entry['cron_method']))
        {
            call_user_func(array($entry['cron_class'], $entry['cron_method']));
        }
    }

the next runtime is being rebuild in XenForo_Cron->run()
 
When selecting Any, and then his save, the next run time would still be what ever it was scheduled for, so to update this I selected the Run command from the Controls menu, and it did update it to show that is is scheduled to run on the next upcoming minute.

I also highlighted all the minutes and saved it too, immediately ran the cron job and the update counters executed every minute (I had to refresh my forum page a lot to test this, :p )

EDIT: As I put the cron back to the original default value a while ago, it was scheduled to run in 55 minutes. I just changed it to Any, ran the job, and now it shows the next scheduled time to run within the minute.
 
yes, but that's because it runs regular and not because you clicked on run;)

it would also be fine to only refresh the page, because the "cron image" is also in the acp footer
Code:
<div id="copyright">
        {xen:phrase xenforo_copyright}
        <xen:if is="{$cronLink}"><img src="{$cronLink}" width="1" height="1" alt="" /></xen:if>
    </div>
^^

So it runs regular and that's why the time is refreshed^^

Edit: hm, now i'm not sure if we're talking about the same
badteeth.gif
 
When selecting Any, and then his save, the next run time would still be what ever it was scheduled for, so to update this I selected the Run command from the Controls menu, and it did update it to show that is is scheduled to run on the next upcoming minute.

Well my next run time only updates when i click Save not when i Run the cron. After that it never runs again. I have tried selecting all the mins as well - still no luck. I seriously cannot figure out what i've done wrong.
 
Well my next run time only updates when i click Save not when i Run the cron. After that it never runs again. I have tried selecting all the mins as well - still no luck. I seriously cannot figure out what i've done wrong.

Hey, I am having a similar issue. My cron jobs seem to randomly stop updating them selves. In this picture that I took this morning (~8:45 AM Aug. 18), you can see that most of the cron entries are still scheduled to next be run yesterday:
hLOReZx.png


The two at the bottom that I selected I just recently manually ran. Any ideas?
 
Disable one cron and then re-enable it. Then you can refresh the page a few times.

However, note that this is generally caused by a cron entry triggering a fatal error. I note a number of crons from add-ons there so one of those may trigger it. You'll need to verify that the crons are running automatically. (1.2.1 will help this issue.)
 
Top Bottom