diff --git a/notifications.cron.inc b/notifications.cron.inc
index 08852b8..87642b7 100644
--- a/notifications.cron.inc
+++ b/notifications.cron.inc
@@ -79,20 +79,39 @@ function notifications_process_prepare() {
 
 /**
  * Clean up event table
- * 
+ *
  * @param $update
  *   Update event counter
  */
 function notifications_event_clean($update = FALSE) {
-  // This expiretime will prevent some race condition that occurs when the event is saved but the subs queue not yet populated  
-  $expiretime = time() - 60; 
+
+  // This expiretime will prevent some race condition that occurs when the event is saved but the subs queue not yet populated
+  $expiretime = time() - 60;
   if ($update) {
     // Update event counter, which keeps the number of notifications pending for each event
-    db_query("UPDATE {notifications_event} e SET counter = (SELECT COUNT(*) FROM {notifications_queue} q WHERE q.eid = e.eid ) WHERE e.created < %d", $expiretime);
+    db_query("UPDATE {notifications_event} e SET counter = (SELECT COUNT(*) FROM {notifications_queue} q WHERE q.eid = e.eid) WHERE e.created < %d", $expiretime);
   }
-  db_query("DELETE FROM {notifications_event} WHERE counter = 0 AND created < %d", $expiretime);
-  // Delete events with no pending notifications. As events are created sequentially, we use this fact to speed up the query
-  db_query("DELETE FROM {notifications_event} WHERE created < %d AND eid < (SELECT MIN(eid) FROM {notifications_queue})", $expiretime); 
+
+  // Create an array for the items in the queue.
+  $queue = array();
+
+  // Get all the existing items within the queue.
+  $result = db_query("SELECT data FROM {queue} WHERE name='notifications_event'");
+  while ($event = db_fetch_object($result)) {
+    $event = unserialize($event->data);
+    $queue[$event->eid] = $event->eid;
+  }
+
+  // Get all events from the notifications queue.
+  $result = db_query("SELECT DISTINCT(eid) FROM {notifications_queue}");
+  while ($event = db_fetch_object($result)) {
+    $queue[$event->eid] = $event->eid;
+  }
+
+  // Delete all events that do not exsit within the queue.
+  $queue = array_values($queue);
+  $sql = "DELETE FROM {notifications_event} WHERE counter=0 AND created<%d AND eid NOT IN (" . db_placeholders($queue, 'int') . ")";
+  db_query($sql, array_merge(array($expiretime), $queue));
 }
 
 /**
diff --git a/notifications.info b/notifications.info
index d362130..c100416 100644
--- a/notifications.info
+++ b/notifications.info
@@ -4,5 +4,6 @@ description = The basic notifications framework
 package = "Notifications"
 dependencies[] = messaging
 dependencies[] = token
+dependencies[] = drupal_queue
 core = 6.x
 php = 5.0
diff --git a/notifications.module b/notifications.module
index 3affb99..5c81389 100644
--- a/notifications.module
+++ b/notifications.module
@@ -432,6 +432,34 @@ function notifications_event_enabled($type, $action) {
 }
 
 /**
+ * Implements hook_cron_queue_info().
+ */
+function notifications_cron_queue_info() {
+  $queues['notifications_event'] = array(
+    'worker callback' => '_notifications_queue',
+    'time' => 60,
+  );
+  return $queues;
+}
+
+
+/**
+ * Queue notifications events for DrupalQueue.
+ */
+function notifications_queue($event) {
+  if (variable_get('notifications_queue_immediate', 1)) {
+    _notifications_queue($event);
+  }
+  else {
+    $queue = drupal_queue_get('notifications_event', TRUE);
+    // Log to watchdog should queue item creation fail.
+    if (!$queue->createItem($event)) {
+      watchdog('notifications', t('Failed to create queue item for notifications.'), WATCHDOG_ERROR);
+    }
+  }
+}
+
+/**
  * Queue events for notifications adding query conditions from plug-ins
  * 
  * This is an example of the resulting query
@@ -447,7 +475,7 @@ function notifications_event_enabled($type, $action) {
  * @param $event
  *   Event array.
  */
-function notifications_queue($event) {
+function _notifications_queue($event) {
   $query = array();
   // Build big insert query using the query builder. The fields for this event type will be added by the plug-ins. 
   // If no arguments retrieved, skip this step
