I continue to see these pile up. If I clear my template cache, I can hit retry on each and they go away, but that's getting tedious.
I have the following from a P&T support request on these a while back, but is there any way to track down where/why these are happening now? I'm not seeing any deprecated tag errors or anything in the CP, nor am I seeing any template errors on the site, and I have a fair number of pages cached where images are being resized.
Hrm... I see the error that's occurring in your log files when that task tries to complete. What looks like happened was that there was an error in your Twig code somewhere inside of one of your {% cache %} tags and that error actually got cached and saved to the database and that is freaking the DeleteStaleTemplatesCache task out.
Kinda hard to back track which cache tag it occurred in and what part of your template code.
But the way to get it worked again is to clear your template caches manually from Settings->Tools. You should be able to click "retry" on those failed tasks again and they should complete fine.
Thanks!
Mark