v1.5.0 makes some back-end changes to the way we manage the lock files and fixes an issue where long running jobs could see multiple job runners executing at the same time
code cleanup: we don't need a custom app class to show jobs
new CLI command: hg:show-crons
new CLI command: hg:run-cron
add logQuiet function to LoggerTrait
rebuilt Lock functionality to use a non-static class, managed by a SubContainer
ensure lock expiry is at least 30 seconds after the max execution time (10 minutes)
v1.4.2 simply adds a check for the installer to prevent installation on XenForo 2.2 - need to install v2 of the JobRunner addon for XF 2.2 compatibility.
There is no need for existing users of this addon running on XenForo v2.1 to upgrade to v1.4.2
rename "Job run trigger" command to avoid issues after upgrading to XF v2.2
Note: If you have set the Job Run Trigger to "Server", you'll need to change it again after upgrading to v1.4.1 because the option name has changed
v1.4.0: Major update for XF v2.1
I've back-ported the new CLI Job Runner and debugger I built for XF v2.2 (which is a drop-in replacement for the built in xf:run-jobs command that comes with XF2.2).
THIS IS A MAJOR UPDATE - THERE ARE STEPS YOU MUST TAKE AFTER UPGRADING TO USE THIS NEW VERSION - SEE UPGRADE INSTRUCTIONS BELOW.
The command is called hg:run-jobs and does the same thing that xf:run-jobs does, but with more options and functionality.
Changes in this release
now includes an admin option to enable/disable the activity based trigger so you don't have to disable the addon to restore activity based triggers
allows commands to process jobs/crons for up to 10 minutes at a time, even when triggered every minute from a cron task (uses a lock file to prevent multiple executions in parallel) - ideal for improving job performance on high traffic sites
more logging functionality for debugging jobs and cron tasks
command has been renamed from xf:run-jobs to hg:run-jobs
XenForo v2.0 is no longer supported (it might work, but I haven't tested it)
Now requires PHP v7.0.0 or higher
Upgrading from v1.3
Install v1.4.x of the addon
change your unix cron entry to execute hg:run-jobs instead of xf:run-jobs - all parameters remain the same
optional: adjust the --time option to anything up to 600 seconds (10 minutes) to allow job processing to take as long as it needs. For example: --time 180 will allow the Job Runner to execute for up to 3 minutes at a time
Thanks to @Xon for identifying the bug fix where AJAX JSON responses would still trigger job.php; and for making suggestions on avoiding unnecessary database queries and prevent running cron jobs unless triggered via our CLI job runner
changes: disable calculations for job auto run time to avoid unnecessary database queries
bug fix: disable AJAX auto job runner from triggering from AJAX JSON responses
changes: don't allow cron tasks to execute unless triggered via the CLI job runner