Python Scoped Slow Task issues

I am using the scoped slow task function to provide the user with progress of a process running in the background however it only appears to work occasionally. Usually, it will work the first time but then won’t show for subsequent uses. Haven’t found any solutions by searching and I only have a working knowledge of Python. A bit perplexed. Not sure if the task is still running in the background when I try running it again? Do I need to clear our the task before running a new one or clear/delete if once the task is completed? Thanks in advance.