Index: modules/poormanscron/poormanscron.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/poormanscron/poormanscron.module,v
retrieving revision 1.11
diff -u -F^f -r1.11 poormanscron.module
--- modules/poormanscron/poormanscron.module	18 Apr 2005 08:55:53 -0000	1.11
+++ modules/poormanscron/poormanscron.module	1 May 2005 09:08:33 -0000
@@ -42,6 +42,11 @@ function poormanscron_exit() {
                  variable_get('poormanscron_lastrun', 0)
                    + 60 * variable_get('poormanscron_retry_interval', 10));
 
+    // Get the current Drupal messages.  Use drupal_set_messages() so that 
+    // the messages aren't deleted in the case that the cron run fails and 
+    // we don't get a chance to restore them below
+    $saved_messages = drupal_set_message();
+
     // Invoke the cron hooks of all enabled modules.
     module_invoke_all('cron');
 
@@ -53,6 +58,17 @@ function poormanscron_exit() {
 
     // Update the time of the last poormanscron run (this one).
     variable_set('poormanscron_lastrun', time());
+    
+    // Delete any messages added during the cron run (and existing prior
+    // messages)
+    drupal_get_messages();
+    
+    // Restore any prior messages
+    foreach ($saved_messages AS $type => $types_messages) {
+    	foreach ($types_messages AS $message) {
+          drupal_set_message($message, $type);
+        }
+    }
   }
 }
 
