$current_time = time();
-$notice = getFacebookNotices(getLastUpdated());
+$since = getLastUpdated();
-print date('r', $current_time) . " Looking for notices to send to Facebook...\n";
+$notice = getFacebookNotices($since);
$cnt = 0;
}
}
-updateLastUpdated($current_time);
+if ($cnt > 0) {
+ print date('r', $current_time) .
+ ": Found $cnt new notices to send to Facebook since last run at " .
+ date('Y-m-d H:i:s', $since) . "\n";
-print "Sent $cnt notices to Facebook.\n";
+ updateLastUpdated($current_time);
+}
exit(0);