diff --git a/bot.php b/bot.php index 1b31363..01c5151 100644 --- a/bot.php +++ b/bot.php @@ -101,6 +101,9 @@ foreach ($articles as $article) { 'parse_mode' => 'Markdown' ]); unset($tdescription); + if (!$config['DRY_RUN']) { + file_put_contents('.lastrun', time()); + } } catch (Longman\TelegramBot\Exception\TelegramException $e) { echo $e; } @@ -120,12 +123,12 @@ foreach ($articles as $article) { $mdescription .= $attachment->url; }*/ $mastodon->status_post($mdescription); + if (!$config['DRY_RUN']) { + file_put_contents('.lastrun', time()); + } } } else { echo $description."\n"; echo $link; } } -if (!$config['DRY_RUN']) { - file_put_contents('.lastrun', time()); -}