diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-01-27 14:23:37 -0800 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-01-27 14:23:37 -0800 |
commit | 500802320693401b5a76ddc351fc70359f6e1b47 (patch) | |
tree | 85585d5892d6c988333b7bab5402e595ca0503b7 /scripts | |
parent | f9403ae99aa08bf9061446e34322132e8faef114 (diff) |
Better logging for update_facebook script.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update_facebook.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php index d2c1c3ffb..485b2a342 100755 --- a/scripts/update_facebook.php +++ b/scripts/update_facebook.php @@ -46,9 +46,9 @@ $facebook = getFacebook(); $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; @@ -81,9 +81,13 @@ while($notice->fetch()) { } } -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); |