When it was in a hanging state, did you see this a a thread in Debug Application?
Next time it happens you can open Debug - Working Threads and check if the task thread is actually running.
Also, I would recommend in this case taking the memory dump of running application and submit it to Kentico support, probably they will be able to investigate in further.
And another thing to check, are you using Kentico Continuous Integration or Staging to sync Scheduled Tasks? Probably theis task may become broken after sync from another system (test or dev).