1

I was wondering if there is a way to run two python scripts at the same time through the command prompt.

I also am wondering if there is a way to run a second python script after another one has already been executed and is currently running.

Thanks

1
  • Just run the scripts in background using &. This will run both the scripts at the same time. Commented Nov 9, 2018 at 4:21

1 Answer 1

10

To execute 2 script at the same time, execute python script1.py & python script2.py

To execute one after the other (without waiting for the first one to finish), you could simply open 2 command prompt windows. Execute each script in each window.

To execute one after the other (after waiting for the first one to finish successfully), execute python script1.py && python script2.py

Sign up to request clarification or add additional context in comments.

1 Comment

python script1.py & python script2.py (concurrently) python script1.py && python script2.py the same (in sequence) ???

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.