As a best practice, we always recommend running the maintenance script in a maintenance window with no process running in the environment.
They to run varies from one database to another, depending on how much data you are keeping and when was the last time you ran the Maintenance script.
We have clients that can stop production; in that case, our maintenance script includes one specific script for this case named "Delete Session Log in Small Batches" these will allow deleting data in small batches and will enable the process to keep running.