Fixed cron task gone from xf_job

NealC

Well-known member
Licensed customer
Affected version
2.3.10
A user informed me view counts weren't incrementing. There was 1 view yet multiple likes on the post. After researching this forum I found other discussions of this occurring and how to fix this by toggling a cron job off and back on again.

The first issue is, why did this happen? Others tell me they've seen it too. What I suggest is a warning in the admin header that this cron entry in xf_job is missing and how to fix it. This should be a normal health check per se.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.11).

Change log:
Fix cron job runner being deleted if a cron job itself hits a fatal error
There may be a delay before changes are rolled out to the XenForo Community.
 
Bumping this again, this same client of ours has just had their crons not run for 17 days. This is probably going to be causing significant issues for a lot of forum owners and they don't realise.
 
Unfortunately I have this problem as well - just now. :(

I guess this query should do the trick (database entry exported from my dev board):

SQL:
INSERT INTO `xf_job` (`unique_key`, `execute_class`, `execute_data`, `manual_execute`, `trigger_date`, `last_run_date`, `attempts`, `priority`) VALUES
(0x63726f6e, 'XF\\Job\\Cron', 0x613a303a7b7d, 0, 1779669301, 1779669242, 0, 100);

I assume trigger_date and last_run_date in the past should not be a problem.

execute_data is kind of empty: a:0:{}.

0x63726f6e (the unique_key) is the binary version of "cron".

I hope inserting this will make the cron system start working again. 🤔
 
It’s more a case of what’s changed to cause this issue and what the fix is, as toggling a cron off and on again will restart them, but the issue is it might not be apparent they’ve stopped for a while to know you have to do that. Looking at the diff from 2.3.9 to 2.3.10 I can’t see what could have changed to introduce this.
 
Bumping this again, this same client of ours has just had their crons not run for 17 days. This is probably going to be causing significant issues for a lot of forum owners and they don't realise.

I'm not sure they fixed it... If they had fixed it, they wouldn't hesitate to share it. Nevermind, i don't care anymore and I don't expect anything from XF dev team anymore.
 
Back
Top Bottom