diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-07 20:03:02 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-07 20:03:02 +0000 |
commit | cdecedef83a73ab8d1011f22e1549d6013897c13 (patch) | |
tree | 1fba64a306e196ce96e04a30b9cd64f2353933de /runprog.py | |
download | SmallYTChannelBot-cdecedef83a73ab8d1011f22e1549d6013897c13.tar.gz SmallYTChannelBot-cdecedef83a73ab8d1011f22e1549d6013897c13.zip |
added YouTube API features
Diffstat (limited to 'runprog.py')
-rw-r--r-- | runprog.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/runprog.py b/runprog.py new file mode 100644 index 0000000..a564678 --- /dev/null +++ b/runprog.py @@ -0,0 +1,23 @@ +from time import sleep +import subprocess +import multiprocessing + +def thread_(): + subprocess.run(["python3", "SmallYTChannelBotSubmissions.py"]) + +while True: + thread = multiprocessing.Process(target = thread_, args = ()) + thread.start() + + sleep(60 * 60 * 2) + + #print("closing...") + #file = open("pid.txt", "r") + #pid = file.readlines()[0] + #file.close() + + #subprocess.run(["kill", pid]) + thread.terminate() + + #print("killed ", pid) + |