You are here

README.txt in Ultimate Cron 8.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 6 README.txt
  3. 7.2 README.txt
  4. 7 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Requirements
 * Installation
 * Configuration
 * Maintainers


INTRODUCTION
------------

The Ultimate Cron module runs cron jobs individually in parallel using
configurable rules, pool management and load balancing.

 * For a full description of the module, visit the project page:
   https://www.drupal.org/project/ultimate_cron

 * To submit bug reports and feature suggestions, or to track changes:
   https://www.drupal.org/project/issues/ultimate_cron


REQUIREMENTS
------------

This module requires no modules outside of Drupal core.


INSTALLATION
------------

 * Install the Ultimate Cron module as you would normally install a
   contributed Drupal module. Visit
   https://www.drupal.org/node/1897420 for further information.


CONFIGURATION
-------------

To add a cron job you can use either hook_cron() or use configuration files with
custom parameters for multiple/additional cron jobs in a module.

The easiest way to declare a cron job is to use hook_cron() and then configure
the cron job through the UI and export it, then change the cron jobs callback
method.

Another way to register a cron job is to add a cron configuration object in a
custom module. In your custom module add in the sub directory
my_module/config/optional a yaml file named
ultimate_cron.job.my_custom_cron_job_name.yml

For an example see the cron configuration of the simplenews module:
http://cgit.drupalcode.org/simplenews/tree/config/optional/ultimate_cron.job.simplenews_cron.yml

After installing the custom module the configuration will become available.
During development you can use the config_devel module to import configuration.

The cron configuration yaml file could look like:

```
langcode: en
status: true
dependencies:
  module:
    - user
title: 'Pings users'
id: user_ping
module: my_module
callback: _my_module_user_ping_cron
scheduler:
  id: simple
  configuration:
    rules:
      - '*/5@ * * * *'
launcher:
  id: serial
  configuration:
    timeouts:
      lock_timeout: 3600
      max_execution_time: 3600
    launcher:
      max_threads: 1
logger:
  id: database
  configuration:
    method: '3'
    expire: 1209600
    retain: 1000
```

The following details of the cron job can be specified:
 - "title": The title of the cron job. If not provided, the
   name of the cron job will be used.
 - "module": The module where this job lives.
 - "callback": The callback to call when running the job.
   Defaults to the job name.
 - "scheduler": Default scheduler (plugin type) for this job.
 - "launcher": Default launcher (plugin type) for this job.
 - "logger": Default logger (plugin type) for this job.


MAINTAINERS
-----------

 * Sascha Grossenbacher (Berdir) - https://www.drupal.org/u/berdir
 * Arne Jørgensen (arnested) - https://www.drupal.org/u/arnested
 * Thomas Gielfeldt (gielfeldt) - https://www.drupal.org/u/gielfeldt
 * Lukas Schneider (LKS90) - https://www.drupal.org/u/lks90

Supporting organizations:

 * MD Systems - https://www.drupal.org/md-systems
 * Reload! - https://www.drupal.org/reload

Thanks to Mark James for the icons:

 * http://www.famfamfam.com/lab/icons/silk/

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Maintainers
  8. INTRODUCTION
  9. ------------
  10. The Ultimate Cron module runs cron jobs individually in parallel using
  11. configurable rules, pool management and load balancing.
  12. * For a full description of the module, visit the project page:
  13. https://www.drupal.org/project/ultimate_cron
  14. * To submit bug reports and feature suggestions, or to track changes:
  15. https://www.drupal.org/project/issues/ultimate_cron
  16. REQUIREMENTS
  17. ------------
  18. This module requires no modules outside of Drupal core.
  19. INSTALLATION
  20. ------------
  21. * Install the Ultimate Cron module as you would normally install a
  22. contributed Drupal module. Visit
  23. https://www.drupal.org/node/1897420 for further information.
  24. CONFIGURATION
  25. -------------
  26. To add a cron job you can use either hook_cron() or use configuration files with
  27. custom parameters for multiple/additional cron jobs in a module.
  28. The easiest way to declare a cron job is to use hook_cron() and then configure
  29. the cron job through the UI and export it, then change the cron jobs callback
  30. method.
  31. Another way to register a cron job is to add a cron configuration object in a
  32. custom module. In your custom module add in the sub directory
  33. my_module/config/optional a yaml file named
  34. ultimate_cron.job.my_custom_cron_job_name.yml
  35. For an example see the cron configuration of the simplenews module:
  36. http://cgit.drupalcode.org/simplenews/tree/config/optional/ultimate_cron.job.simplenews_cron.yml
  37. After installing the custom module the configuration will become available.
  38. During development you can use the config_devel module to import configuration.
  39. The cron configuration yaml file could look like:
  40. ```
  41. langcode: en
  42. status: true
  43. dependencies:
  44. module:
  45. - user
  46. title: 'Pings users'
  47. id: user_ping
  48. module: my_module
  49. callback: _my_module_user_ping_cron
  50. scheduler:
  51. id: simple
  52. configuration:
  53. rules:
  54. - '*/5@ * * * *'
  55. launcher:
  56. id: serial
  57. configuration:
  58. timeouts:
  59. lock_timeout: 3600
  60. max_execution_time: 3600
  61. launcher:
  62. max_threads: 1
  63. logger:
  64. id: database
  65. configuration:
  66. method: '3'
  67. expire: 1209600
  68. retain: 1000
  69. ```
  70. The following details of the cron job can be specified:
  71. - "title": The title of the cron job. If not provided, the
  72. name of the cron job will be used.
  73. - "module": The module where this job lives.
  74. - "callback": The callback to call when running the job.
  75. Defaults to the job name.
  76. - "scheduler": Default scheduler (plugin type) for this job.
  77. - "launcher": Default launcher (plugin type) for this job.
  78. - "logger": Default logger (plugin type) for this job.
  79. MAINTAINERS
  80. -----------
  81. * Sascha Grossenbacher (Berdir) - https://www.drupal.org/u/berdir
  82. * Arne Jørgensen (arnested) - https://www.drupal.org/u/arnested
  83. * Thomas Gielfeldt (gielfeldt) - https://www.drupal.org/u/gielfeldt
  84. * Lukas Schneider (LKS90) - https://www.drupal.org/u/lks90
  85. Supporting organizations:
  86. * MD Systems - https://www.drupal.org/md-systems
  87. * Reload! - https://www.drupal.org/reload
  88. Thanks to Mark James for the icons:
  89. * http://www.famfamfam.com/lab/icons/silk/