Run multiple macros one after the other using the Python example

I would like to run a series of UI.Vision macros one after the other. Macros must be ran at different frequencies. Some of them every 5 minutes, some of them every hours.
This can be done, I think, using the command line and making loop inside infinite loop.
The other specificity is that command line have to be run from a Jupyter notebook.
I used the example of python code on Github with the PlayAndWait function and it seems it is working fine in the notebook.
I have seen the example of running macros one after the other using Powershell, but I cannot do it with python.
The problem is that when I run the python script with more than one call of the PlayAndWait function, while the macro is executing well, the python execution always finishes with “Macro did not complete withing the time given” and never execute the lines below the first call.
I am not a developer and I possibly miss something in the use of the python script.
Could someone helpme with that ?

Can you post a link to the `Python script that you are using?

Hello Plankton,

Here it is (1.9 KB)