If I remember correctly, there is a difference between run() and continueRun().
run(): runs the simulation for the specified time in background without visualization
continueRun(): runs the simulation for the specified time with visualization
Technically there are also be other ways to specify the simulation run time, but unfortunately there seem to be issues when trying to change the value of the property SimulationRunTime.
Like Job said, it is a known issue when trying to control the execution of simulation via Python script. Sorry, try using .NET API to create a simple .NET command that can start and stop the simulation based on a given time argument, and then call that command in your script using the netCommand([Float runtime]).