This example demonstrates how to use the Cron API, including hook_cron() and hook_cron_queue_info().
This example is part of the Examples for Developers project.
Parent topics
File
- modules/
examples/ cron_example/ cron_example.module, line 7 - Hook implementations for the Cron Example module.
Functions
Name | Location | Description |
---|---|---|
cron_example_add_jobs_to_queue |
modules/ |
Submit function used to add the items to the queue. |
cron_example_config_info |
modules/ |
Implements hook_config_info(). |
cron_example_cron |
modules/ |
Implements hook_cron(). |
cron_example_cron_queue_info |
modules/ |
Implements hook_cron_queue_info(). |
cron_example_date_iso8601 |
modules/ |
|
cron_example_form |
modules/ |
The form to provide a link to cron.php. |
cron_example_form_cron_run_submit |
modules/ |
Allow user to directly execute cron, optionally forcing it. |
cron_example_menu |
modules/ |
Implements hook_menu(). |
cron_example_queue_1_worker |
modules/ |
Simple worker for our queues. |
cron_example_queue_2_worker |
modules/ |
Simple worker for our queues. |
cron_example_queue_report_work |
modules/ |
Simple reporter for the workers. |
Classes
Name | Location | Description |
---|---|---|
CronExampleTestCase |
modules/ |
cron_example test class |