aboutsummaryrefslogtreecommitdiffstats
path: root/runprog.py
diff options
context:
space:
mode:
Diffstat (limited to 'runprog.py')
-rw-r--r--runprog.py23
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)
+