1. 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

Discussion in 'Troubleshooting and Problems' started by allewreK, Aug 6, 2013.

  1. allewreK

    allewreK Active Member


    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 ?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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:

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

    allewreK Active Member

    I have a lot of visits, even by night. And that code exists.
  4. Mike

    Mike XenForo Developer Staff Member

    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:

    <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.
    Jake Bunce likes this.
  5. allewreK

    allewreK Active Member

    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.

Share This Page