Okay... I want to believe what I'm being told guys but I'm proving otherwise with every test you have me perform...
The new code:
import sys;
import subprocess;
import threading;
# Edit this to add each python file you wish to use
#print(sys.path)
def spinup_Thread(myMethod):
thr = threading.Thread(target=myMethod, args=(), kwargs={})
thr.start()
def start_Bot(botFile):
subprocess.call(["python3.9", botFile])
bot_files = [
"/pathToBot/Bot1.py"
,"/pathToBot/Bot2.py"
]
for botFile in bot_files:
spinup_Thread(start_Bot(botFile))
# Do not edit below this line
Now this RUNS but guess what? Still only bot 1 will run...
Output:
2022-03-29 13:23:44 - Task preparing to start
Mar 29 13:29:53 We have logged in as Bot1#XXXX
Now THIS Code doesn't even run/start:
import sys;
import subprocess;
import threading;
# Edit this to add each python file you wish to use
#print(sys.path)
def spinup_Thread(myMethod):
thr = threading.Thread(target=myMethod, args=(), kwargs={})
thr.start()
def start_Bot(botFile):
subprocess.**Popen**(["python3.9", botFile])
bot_files = [
"/pathToBot/Bot1.py"
,"/pathToBot/Bot2.py"
]
for botFile in bot_files:
spinup_Thread(start_Bot(botFile))
But here is the kicker to all of this still... ALL of the sample code I have posted to this thread runs FINE if done via A CONSOLE, to be clear my code is only proving to be an issue when ran as a TASK...
I have tried threading, I have tried subprocesses both call & Popen (and yes I know the difference, Popen would be preferred as it doesn't care about process completion) but none of it works, so if you're telling me there are no limitations I'm telling you there are problems
I can't stress enough how I want this service to work out for me, your consoles do exactly what I need and all of the code I have uploaded runs via the consoles (runs extremely well) so I'm able to limp by currently but need this always on task to work so I don't have to kick the jukebox every couple days so to speak...