Stop keeping the task alive, make sure to call this when your slow operation is finished. It's a good idea to wrap your slow code with a try { ... } finally {heartBeat.stop()}} to ensure that the heartBeat is stopped. If the heartBeat remains alive failed jobs can remain 'running' indefinitely.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.