You are here

README.txt in Cron Debug 7

Cron Debug 1.2 for Drupal 7.x
------------------------------

Cron Debug will help you find cron processes which

  * fail due to programming or runtime errors
  * time out (PHP, server, database)
  * are very slow

Cron Debug will also allow you to test run specific cron functions while not
running others. This can be nice for developing cron functions where you don't
want to run a full cron.php with all maintenece, alerts and other tasks
everytime you test your own function.

Cron Debug can run cron hooks while registering success and time elapsed for
each. You can see which hooks will be run in which sequence, select which
hooks to run and see their duration in the results as well as in the log.

If a cron process times out, hangs or fails, you can see which ones finished
succesfully and which single one did not finish properly by looking in the log
when returning to Drupal's reports. All Cron Debug log entries are registered
as "cron debug" and can be filtered separately. If the cron run failed, the
usurper will be the top/last entry in the list of Cron Debug entries in the log.

A flag is set when the Cron Debug run is started and removed when it finishes
succesfully and reports its results. If some part of the cron run fails, hangs
or times out, this flag will most likely still be set upon returning to Drupal,
and if you go into Cron Debug again, you will get a message telling you so,
urging you to look in the log to diagnose the problem. Cron Debug will also
try to display details on the failed process when it has halted with an error.

Cron jobs can also be run "individually", meaning that they are not called as
a part of a joint cron run, but called individually as single functions with
immediate return to Cron Debug. This enables you to quickly and easily track
down syntax and runtime errors in a single function and possibly analyze the
output that it might generate; legitimate or erroneous, which can be helpful
in debugging. This way of executing the function will also time it, and give
you the option to analyze the single function's influence on database,
variables, files and other system elements. The start and the end of the run
is marked in the log, and errors logged between these two marks come from that
particular function or functions that it calls.

Notice that your regular cron jobs will run as usual if you have set them up.
You might want to disable cron on the server while debugging with Cron Debug.
This module runs the cron jobs for each module separately from the usual cron
run found in common.inc and invoked by running example.com/cron.php.
Running cron.php will not register any debug code. You will have to run the
Cron Debug routine to get this registration.

Also notice that

  * some modules have local settings, which enable and disable or configure
    cron runs for that module. In such cases it might appear in Cron Debug's
    runs as if the hook ran smoothly even though the function in the module
    might return without having done anything. In order to debug cron jobs
    in such modules, you will have to tamper with the module's own settings
    and enable the relevant cron routines.
  * some custom modules may call external functions and not return properly
    to Drupal in which case they may run as planned, but not register as
    finished in the log. Disable those jobs in order to have a smooth cron run,
    and (hopefully) a successful return to Drupal.


Installation
------------
Cron Debug can be installed like any other Drupal module -- place it in the
modules directory for your site and enable it on the `admin/build/modules` page.
Once it's installed, you find the control of the module in the Debug-tab on
the Cron configuration page - admin/config/system/cron/debug

File

README.txt
View source
  1. Cron Debug 1.2 for Drupal 7.x
  2. ------------------------------
  3. Cron Debug will help you find cron processes which
  4. * fail due to programming or runtime errors
  5. * time out (PHP, server, database)
  6. * are very slow
  7. Cron Debug will also allow you to test run specific cron functions while not
  8. running others. This can be nice for developing cron functions where you don't
  9. want to run a full cron.php with all maintenece, alerts and other tasks
  10. everytime you test your own function.
  11. Cron Debug can run cron hooks while registering success and time elapsed for
  12. each. You can see which hooks will be run in which sequence, select which
  13. hooks to run and see their duration in the results as well as in the log.
  14. If a cron process times out, hangs or fails, you can see which ones finished
  15. succesfully and which single one did not finish properly by looking in the log
  16. when returning to Drupal's reports. All Cron Debug log entries are registered
  17. as "cron debug" and can be filtered separately. If the cron run failed, the
  18. usurper will be the top/last entry in the list of Cron Debug entries in the log.
  19. A flag is set when the Cron Debug run is started and removed when it finishes
  20. succesfully and reports its results. If some part of the cron run fails, hangs
  21. or times out, this flag will most likely still be set upon returning to Drupal,
  22. and if you go into Cron Debug again, you will get a message telling you so,
  23. urging you to look in the log to diagnose the problem. Cron Debug will also
  24. try to display details on the failed process when it has halted with an error.
  25. Cron jobs can also be run "individually", meaning that they are not called as
  26. a part of a joint cron run, but called individually as single functions with
  27. immediate return to Cron Debug. This enables you to quickly and easily track
  28. down syntax and runtime errors in a single function and possibly analyze the
  29. output that it might generate; legitimate or erroneous, which can be helpful
  30. in debugging. This way of executing the function will also time it, and give
  31. you the option to analyze the single function's influence on database,
  32. variables, files and other system elements. The start and the end of the run
  33. is marked in the log, and errors logged between these two marks come from that
  34. particular function or functions that it calls.
  35. Notice that your regular cron jobs will run as usual if you have set them up.
  36. You might want to disable cron on the server while debugging with Cron Debug.
  37. This module runs the cron jobs for each module separately from the usual cron
  38. run found in common.inc and invoked by running example.com/cron.php.
  39. Running cron.php will not register any debug code. You will have to run the
  40. Cron Debug routine to get this registration.
  41. Also notice that
  42. * some modules have local settings, which enable and disable or configure
  43. cron runs for that module. In such cases it might appear in Cron Debug's
  44. runs as if the hook ran smoothly even though the function in the module
  45. might return without having done anything. In order to debug cron jobs
  46. in such modules, you will have to tamper with the module's own settings
  47. and enable the relevant cron routines.
  48. * some custom modules may call external functions and not return properly
  49. to Drupal in which case they may run as planned, but not register as
  50. finished in the log. Disable those jobs in order to have a smooth cron run,
  51. and (hopefully) a successful return to Drupal.
  52. Installation
  53. ------------
  54. Cron Debug can be installed like any other Drupal module -- place it in the
  55. modules directory for your site and enable it on the `admin/build/modules` page.
  56. Once it's installed, you find the control of the module in the Debug-tab on
  57. the Cron configuration page - admin/config/system/cron/debug