Index: poormanscron.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/poormanscron/poormanscron.admin.inc,v retrieving revision 1.1 diff -u -r1.1 poormanscron.admin.inc --- poormanscron.admin.inc 6 Feb 2008 16:35:17 -0000 1.1 +++ poormanscron.admin.inc 11 Feb 2008 07:10:55 -0000 @@ -31,11 +31,5 @@ '#options' => array('1' => t('Yes'), '0' => t('No')), '#description' => t('If you want to log successful cron runs to the Drupal watchdog, say Yes here. If those messages annoy you, disable them by selecting No.') ); - $form['logging']['poormanscron_log_progress'] = array( - '#type' => 'select', '#title' => t('Log poormanscron progress'), - '#default_value' => variable_get('poormanscron_log_progress', 0), - '#options' => array('1' => t('Yes'), '0' => t('No')), - '#description' => t('If you want to log the progress of a poormanscron run to the Drupal watchdog, say Yes here. If those messages annoy you, disable them by selecting No.') - ); return system_settings_form($form); } Index: poormanscron.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/poormanscron/poormanscron.module,v retrieving revision 1.21 diff -u -r1.21 poormanscron.module --- poormanscron.module 6 Feb 2008 16:35:17 -0000 1.21 +++ poormanscron.module 11 Feb 2008 07:10:37 -0000 @@ -1,5 +1,5 @@ $value) { - if (module_hook($key, 'cron')) { - $tt = time(); - module_invoke($key, 'cron'); - watchdog('cron', "Executed %hook via poormanscron, took %time.", array('%time' => format_interval(time() - $tt, 1) . '.', '%hook' => "${key}_cron")); - } - } + $message = NULL; + if (drupal_cron_run()) { + $message = 'Cron run completed (via poormanscron).'; } else { - // Invoke the cron hooks of all enabled modules, no progress logging. - module_invoke_all('cron'); + $message = 'Cron run unsuccessful (via poormanscron).'; } // Write a message to the logs if the user wants us to do so. if (variable_get('poormanscron_log_cron_runs', 1) == 1) { - watchdog('cron', 'Cron run completed (via poormanscron).'); + watchdog('cron', $message); } $t = time(); @@ -71,10 +63,6 @@ // Update the time of the last poormanscron run (this one). variable_set('poormanscron_lastrun', $t); - // Update the $cron_last variable, in order to update the - // cron status in admin/settings. - variable_set('cron_last', $t); - // Delete any messages added during the cron run (and existing prior // messages). drupal_get_messages();