diff options
author | root <root@localhost.localdomain> | 2020-09-05 22:32:50 +0100 |
---|---|---|
committer | root <root@localhost.localdomain> | 2020-09-05 22:32:50 +0100 |
commit | b4817b94bd6d4c1e177fe55201bf0da0f335de75 (patch) | |
tree | 50bc92c3c63533714ff9a4edb1cf29d32e653c06 /bot.py | |
parent | ebc74eb418ce3728624dbb36df60d5b645b2aaf5 (diff) | |
download | yaoi-communism-b4817b94bd6d4c1e177fe55201bf0da0f335de75.tar.gz yaoi-communism-b4817b94bd6d4c1e177fe55201bf0da0f335de75.zip |
added running the program as a cron job
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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()
|