diff --git a/scheduler.module b/scheduler.module
index 1bf6739..e8804f5 100644
--- a/scheduler.module
+++ b/scheduler.module
@@ -826,9 +826,11 @@ function _scheduler_publish() {
   $result = FALSE;
 
   // If the time now is greater than the time to publish a node, publish it.
+  // The INNER join on 'node' and 'users' is just to ensure the nodes are valid.
   $query = db_select('scheduler', 's');
   $query->addField('s', 'nid');
-  $query->addJoin('LEFT ', 'node', 'n', 's.nid = n.nid');
+  $query->addJoin('INNER', 'node', 'n', 's.nid = n.nid');
+  $query->addJoin('INNER', 'users', 'u', 'u.uid = n.uid');
   $query->condition('s.publish_on', 0, '>');
   $query->condition('s.publish_on', REQUEST_TIME, '<');
   $query_result = $query->execute();
@@ -903,9 +905,11 @@ function _scheduler_unpublish() {
   $result = FALSE;
 
   // If the time is greater than the time to unpublish a node, unpublish it.
+  // The INNER join on 'node' and 'users' is just to ensure the nodes are valid.
   $query = db_select('scheduler', 's');
   $query->addField('s', 'nid');
-  $query->addJoin('LEFT', 'node', 'n', 's.nid = n.nid');
+  $query->addJoin('INNER', 'node', 'n', 's.nid = n.nid');
+  $query->addJoin('INNER', 'users', 'u', 'u.uid = n.uid');
   $query->condition('s.unpublish_on', 0, '>');
   $query->condition('s.unpublish_on', REQUEST_TIME, '<');
   $query_result = $query->execute();
