diff --git a/Post_RSS_on_SubStack.py b/Post_RSS_on_SubStack.py index d035d19..1171d5d 100644 --- a/Post_RSS_on_SubStack.py +++ b/Post_RSS_on_SubStack.py @@ -73,9 +73,9 @@ class SubStackTask: async def run_daily_at_6_am(self): while True: - now = datetime.now() + now = datetime.datetime.now() # Calculate the time until 6 AM next day - next_run = (now + timedelta(days=1)).replace(hour=6, minute=5, 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() # Wait until the next run time