I got an error message " Task is pending avilable resource"
Sounds like the adhocTaskHeartbeat may not be running.
It’s on by default, can you make sure the adhocTaskHeartBeat feature has not been disabled?
Easiest way is to enter feature list adhoc
in the dev console.
Alternatively, all the available threads in the adhoc task thread pool may be in use (but you would expect this to eventually resolve).
You can also check that the adhoc task bg thread is running by visiting Admin → System → System info → Heartbeat threads.