Without being able to reproduce this i have no idea where to start looking into it.
There is no difference in how the routines are executed between starting them in the UI and from the scheduler. Only the way they are triggered differs.
It could possibly relate to the notifications being stuck and not the actual process.
If this happens you open SD Maid, does it show as stuck in the UI too?
I don't know, since the problem occurred two times in a row I chose not to run the tasks automatically and do it manually.. Will see later if I can reproduce it, but as far as I remember if I clicked on the stuck notification nothing happened..