• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Cron task does not run at night

allewreK

Active member
#1
Hello,

It looks like on night, my cron task skips to run. Since it has not been run, it's stuck, and won't run before I manually execute it.

Any ideas ?
 

Jake Bunce

XenForo moderator
Staff member
#2
The cron system is driven by page loads. If no one visits your forum for a while then those tasks won't run.

And make sure this code exists in the PAGE_CONTAINER template:

Code:
<xen:if is="{$cronLink}"><img src="{$cronLink}" width="1" height="1" alt="" style="display: none" /></xen:if>
 

allewreK

Active member
#3
The cron system is driven by page loads. If no one visits your forum for a while then those tasks won't run.

And make sure this code exists in the PAGE_CONTAINER template:

Code:
<xen:if is="{$cronLink}"><img src="{$cronLink}" width="1" height="1" alt="" style="display: none" /></xen:if>
I have a lot of visits, even by night. And that code exists.
 

Mike

XenForo developer
Staff member
#4
That cron line is not relevant in 1.2 (it was for 1.1). It's this line in the PAGE_CONTAINER template that triggers it:

Code:
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml">
Particularly, the RunDeferred bit.
 

allewreK

Active member
#5
My cron tasks are running fine, but sometimes, like after 12 hours (and even if there are visitors on my site), the cron taks is not runned. When it's not runned, it's getting stuck since it has not been run, and the next update hour is not being incremented.

The problem is on defaults XenForo's cron tasks, like ban lifting or boards counters.