README.txt

  1. 6.x README.txt
  2. 6.x modules/tinymce/README.txt
  3. 6.x modules/student_files/README.txt
  4. 6.x modules/batch/README.txt
  5. 6.x modules/lassie/README.txt
  6. 6.x modules/prereqs/README.txt
  7. 6.x themes/how_to_customize/README.txt
  8. 6.x modules/encryption/README.txt
  9. 6.x custom/files/README.txt
  10. 4.x README.txt
  11. 4.x modules/tinymce/inc/tiny_mce/plugins/style/readme.txt
  12. 4.x modules/tinymce/README.txt
  13. 5.x README.txt
  14. 5.x modules/tinymce/README.txt
  15. 5.x modules/batch/README.txt
  16. 5.x themes/basic/README.txt
  17. 5.x inc/pchart/README.txt
  18. 5.x inc/pchart/pchart/readme.txt
  19. 5.x modules/tinymce/inc/tiny_mce/plugins/style/readme.txt
Lassie
========================
Richard Peacock (flightpathacademics.com)


DESCRIPTION

The Lassie modue is meant to be used by module and routine developers,
to monitor long-running jobs and to make sure they finish within the expected
amount of time.

If a job doesn't finish, Lassie will email an admin user to warn them.

This module is very useful for making sure a nightly routine finished without errors.


REQUIREMENTS
In order to function correctly, you should set your site's cron to run at least once per hour.



USE

In your code, "start" a job for Lassie to monitor like so:

  lassie_start($job_name, $hours, $emails);

* $job_name must be a machine name (no spaces or unusual characters) unique to this job.

* $hours is an INTEGER (whole number-- no decimals) which tells Lassie how long we *expect* the job to take to run.  If we do not finish
  within this number of hours, the email addresses will be notified.

* $emails is an optional list of emails addresses (separated by comma) to notify if the job fails to end by $hours.


To tell Lassie that you have finished the job, always end your routine with:

  lassie_finish($job_name);  

File

modules/lassie/README.txt
View source
  1. Lassie
  2. ========================
  3. Richard Peacock (flightpathacademics.com)
  4. DESCRIPTION
  5. The Lassie modue is meant to be used by module and routine developers,
  6. to monitor long-running jobs and to make sure they finish within the expected
  7. amount of time.
  8. If a job doesn't finish, Lassie will email an admin user to warn them.
  9. This module is very useful for making sure a nightly routine finished without errors.
  10. REQUIREMENTS
  11. In order to function correctly, you should set your site's cron to run at least once per hour.
  12. USE
  13. In your code, "start" a job for Lassie to monitor like so:
  14. lassie_start($job_name, $hours, $emails);
  15. * $job_name must be a machine name (no spaces or unusual characters) unique to this job.
  16. * $hours is an INTEGER (whole number-- no decimals) which tells Lassie how long we *expect* the job to take to run. If we do not finish
  17. within this number of hours, the email addresses will be notified.
  18. * $emails is an optional list of emails addresses (separated by comma) to notify if the job fails to end by $hours.
  19. To tell Lassie that you have finished the job, always end your routine with:
  20. lassie_finish($job_name);