How to add a subTask to an already running Task?
Sub-tasks can only be initiated by the parent task, and they will only visually look like a sub-task if they are actually sub-tasks.

It’s also not possible to change the settings of an already-running task, at least without manually checking for new settings in your task.

So, your parent task’s getStep() function would need to do its own checking to see if it should be running a sub-task, somehow, and then conditionally call $this-&gt;runSubTask().