diff --git a/scripts/tkremind b/scripts/tkremind index 0f503493..91c144f3 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -2860,12 +2860,6 @@ proc IssueBackgroundReminder { file time now tag } { exec "/bin/sh" "-c" $Option(RunCmd) "&" } } - - # reread status - if {$file != "stdin"} { - puts $file "STATUS" - flush $file - } } #*********************************************************************** diff --git a/src/queue.c b/src/queue.c index 314f3d3d..eadf11c8 100644 --- a/src/queue.c +++ b/src/queue.c @@ -329,17 +329,20 @@ void HandleQueuedReminders(void) /* Calculate the next trigger time */ q->tt.nexttime = CalculateNextTime(q); - /* If trigger time is way in the past because computer has been - suspended or hibernated, remove from queue */ + /* If it's dequeued, update num_queued */ if (q->tt.nexttime != NO_TIME) { + /* If trigger time is way in the past because computer has been + suspended or hibernated, remove from queue */ if (q->tt.ttime < MinutesPastMidnight(1) - MaxLateMinutes && q->tt.nexttime < MinutesPastMidnight(1) - MaxLateMinutes) { q->tt.nexttime = NO_TIME; - if (IsServerMode()) { - print_num_queued(); - } } } + + /* If we have dequeued a reminder, update controlling process */ + if (q->tt.nexttime == NO_TIME && IsServerMode()) { + print_num_queued(); + } } exit(EXIT_SUCCESS); }