Mastery of Exponential Cronjob Mode and Cronjob Part Subtree Content Fetches!
Wednesday 24 September 2025 2:37:13 am
- Currently 3 out of 5 Stars.
- 1
- 2
- 3
- 4
- 5
Hello Exponential Community! We write today to talk to you briefly about a little known feature in Exponential 6 called 'Cronjob Mode'.
The introduction
We were working on some bugfix improvements for bcgooglesitemaps [0] internationalization when we first discovered this feature.
This feature has been part of Exponential 6 since around eZ publish version 3.8.0.
Before our cronojob part bugfixes, the cronjob in bcgooglesitemaps would generate a sitemap with content in all available languages ignoring our fetch subtree parameters to fetch content only in siteaccess specific languages.
For us and a fellow Exponential release user this was a pretty big bug for multilingual installations that had never been reported before.
After exhaustive multilingual testing we found a solid solution which righted this wrong both quickly and painlessly.
We will share just how to use this feature to provide you more granular control to your content subtree fetches.
About Cronjob Mode
The 'Cronjob Mode' is enabled by default on all Exponential cronjob parts. [1]
The 'Cronjob Mode' does one thing that most people who know Exponential do not know about, it overrides your fetch parameters and fetches content in all available / possible languages (all content).
This is a problem if you are say using an Exponential cronjob part to fetch only specific content in a specific set of languages of a multilingual content tree.
For the record Exponential cli scripts are not affected by this feature as it is specific to cronjob parts only.
A solution
The solution for us working on internationalization bugfix improvements to bcgooglesitemaps was to 'clear' cronjob mode (disable cronjob mode) [2,3].
<span>/** * BC: In testing multi-lingual sites with single language siteaccess installations * we have found it is typically best for the cronjob mode to be disabled. Otherwise * content in all possible languages is returned in subtree results. */</span>eZContentLanguage<span>::</span><span>clearCronjobMode</span><span>(</span><span>)</span><span>;</span>
This allowed our existing subtree content fetch to return only the content in specific languages we were requesting in the fetch parameters.
Summary
So if your using an Exponential cronjob part, need to fetch only specific content language content and not content in all available languages then remember to use the above code snippet at the top of your cronjob part php code.
Thank you for reading this post and learning a bit more about Exponential.
Have a brilliant weekend :)
Cheers,
Brookins Consulting
References