Cron implementation for Processwire

There are two methods of running your task.

  • a) use an autoload module that hooks on the PWCron->cronHook()
  • b) use "Modules to run" configuration field to add your Module and Method to be ran at desired intervals

A requires that your module supports PWCron and handles the logging and rundelays internally B allows any module to be loaded and any function to be called and doesnt require direct support

PWCron requires that you have Cron or equivalent system to execute the module in the background. Suggested interval is 5-60 minutes depending on how often you want the subsystem calls to run. Cron example is that is run every 5 minutes:

System cron:

*/5 * * * * <user> <path_to_php-cli> <path_to_processwire>/site/modules/PWCron/cron.php

User cron:

*/5 * * * * <path_to_php-cli> <path_to_processwire>/site/modules/PWCron/cron.php

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #490
    In the 490th issue of ProcessWire Weekly we'll check out what's new in the latest core version ProcessWire 3.0.229, introduce a brand-new third party module, and more. Read on! / 30 September 2023
  • ProcessWire 3.0.226 new main/master version
    After 8 months in development we are excited to bring you ProcessWire 3.0.226 main/master. This version has a ton of great new features, improvements and optimizations, plus more than 100 issue fixes. This post takes an in-depth look at highlights from this great new version.
    Blog / 25 August 2023
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH