mejicat
Member
Hello,
I'm quite new to XF2, and I'm still sort-of figuring out how things work.
It seems that "cron jobs" in XF2 aren't actually inserted into a crontab, but are handled by the software according to their schedule. Since PHP is stateless and would need some special configuration to actually have a "job process" running, I guess that actual jobs are run either on page loads or somehow via AJAX. This poses a few problems:
Of course this is assuming something like that doesn't exist already... I tried looking through the official docs and the forums, but I couldn't find anything for XF2!
I'm quite new to XF2, and I'm still sort-of figuring out how things work.
It seems that "cron jobs" in XF2 aren't actually inserted into a crontab, but are handled by the software according to their schedule. Since PHP is stateless and would need some special configuration to actually have a "job process" running, I guess that actual jobs are run either on page loads or somehow via AJAX. This poses a few problems:
- if nobody visits a page during a time interval when cron jobs are scheduled, jobs are postponed and run (at the same time? in different requests?) at the first request.
- if jobs are run on page loads, responses are slowed down since the job must run before displaying the page. while XF2 is generally very fast, I've experienced a few times where pages took up to 5 seconds to load, and I suspect cron jobs are responsible.
- if they're run continuously via AJAX, it's just a waste of people's bandwidth and totally unnecessary.
Of course this is assuming something like that doesn't exist already... I tried looking through the official docs and the forums, but I couldn't find anything for XF2!
Last edited: