Execution of multiple Python scripts at the same time

Tags: #<Tag:0x00007f3f17e59860>

Hi, I’ve a question about python scripts. The execution of multiple Python scripts started at the same time is really at the same time or the system runs these scripts
one after the other?
Thanks in advice for any help.

A little of both.

Home Assistant performs more than one task at a time. However, the actions list is performed in order.

So, if you have:

action:
  - service: python_script.one
  - service: python_script.two

… Home Assistant will start the first, run around and do a few other things, then start the second even if the first hasn’t completed yet. The time in between the first and second script starting is unknown, since it’ll depend on what other things are happening on your system at the time and how fast the machine running Home Assistant is, but, in most cases, it will be way less than a second.

1 Like

Thanks for the fast reply. It was exactly what i needed to know. :+1:

1 Like