From b4817b94bd6d4c1e177fe55201bf0da0f335de75 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 5 Sep 2020 22:32:50 +0100 Subject: added running the program as a cron job --- bot.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bot.py') diff --git a/bot.py b/bot.py index 27a5f3a..7e3c6f7 100644 --- a/bot.py +++ b/bot.py @@ -1,3 +1,6 @@ +import os +os.chdir("/root/yaoi-communism") + from twython import Twython import get_images @@ -13,8 +16,4 @@ def post(): get_images.logging.info("Posted to twitter.") if __name__ == "__main__": - import time - - while True: - post() - time.sleep(60*60) + post() -- cgit v1.2.3