CLI Job / Cron Runner

CLI Job / Cron Runner 2.1.0

No permission to download
Update
  • had required parameters after optional parameters - re-arranging logJobProgress function signature to make it more usable
  • added new option --reset to delete any existing lockfile - useful in situations where a job has crashed without removing the lock and you don't want to wait 10 minutes for the lock to expire
Important: if you also run my SparkPost addon - you must update that to the new v2.1.0 release after updating this addon

Addon has now been tested on PHP 8.0
Stable release of v2.0.0 - tested on XF 2.2.0 stable

Changes:
  • listen to app_cli_setup rather than app_setup do we don't instantiate our SubContainer unnecessarily
  • fix an issue where upgrade from v1.5 fails due to legacy Setup.php file
v2.2.0b3 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.

This version has also been updated to more closely match some of the structure and options for the core job runner included in XF 2.2

Note breaking change: the --time option has been renamed --max-execution-time inline with the options provided by the XF2.2 core job runner.

Other changes:
  • 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
  • XF2.2 updates the XF time after each queue run
  • 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)
  • Like
Reactions: yin9
remove redundant class extension thanks to XF 2.2b2
  • Like
Reactions: yin9
Top