From e0127a0362f4c6f89f8682e1cadcbd59295038b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl?= Date: Wed, 3 Jul 2024 17:02:58 +0200 Subject: [PATCH] reset the time to 6pm --- Post_RSS_on_SubStack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Post_RSS_on_SubStack.py b/Post_RSS_on_SubStack.py index 3e4fc3a..ec3b8b1 100644 --- a/Post_RSS_on_SubStack.py +++ b/Post_RSS_on_SubStack.py @@ -99,11 +99,11 @@ class SubStackTask: formatted_date = formatted_date.replace(en, fr) return formatted_date - async def run_daily_at_11_am(self): + async def run_daily_at_6_am(self): while True: now = datetime.datetime.now() # Calculate the time until 6 AM next day - next_run = (now + datetime.timedelta(days=1)).replace(hour=11, minute=0, second=0, microsecond=0) + next_run = (now + datetime.timedelta(days=1)).replace(hour=6, minute=5, second=0, microsecond=0) sleep_seconds = (next_run - now).total_seconds() while sleep_seconds > 0: @@ -257,7 +257,7 @@ async def main(login, password, account): task = SubStackTask(login, password, cookies_path, account, feeds) LOG.info("Starting bot") - await task.run_daily_at_11_am() + await task.run_daily_at_6_am() #await task.daily_task()