The following little script is supposed to run a shell command with a parameter every 10 minutes. It’s ran correctly once (30 minutes ago) however isn’t playing ball now (should have done the process another 2 times since). Have I made an error?
while(True): subprocess.call(["command","param"]) time.sleep(600)
You subprocess.call probably blocked on whatever your command was. I doubt its your python script, but rather whatever the shell command might be (taking too long).
You can tell if your command is completing or not by checking the return code:
print subprocess.call(["command","param"])It should print
0if it was successful, or raise an exception if the command has problems. But if you never see consecutive prints, then its never returning from the call.