function common_test_cron

Same name in other branches
  1. 9 core/modules/system/tests/modules/common_test/common_test.module \common_test_cron()
  2. 8.9.x core/modules/system/tests/modules/common_test/common_test.module \common_test_cron()
  3. 10 core/modules/system/tests/modules/common_test/common_test.module \common_test_cron()
  4. 11.x core/modules/system/tests/modules/common_test/common_test.module \common_test_cron()

Implements hook_cron().

System module should handle if a module does not catch an exception and keep cron going.

See also

common_test_cron_helper()

2 string references to 'common_test_cron'
common_test_cron_helper_cron in modules/simpletest/tests/common_test_cron_helper.module
Implements hook_cron().
CronRunTestCase::testCronExceptions in modules/system/system.test
Make sure exceptions thrown on hook_cron() don't affect other modules.

File

modules/simpletest/tests/common_test.module, line 292

Code

function common_test_cron() {
    throw new Exception(t('Uncaught exception'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.