Heartbeat middleware implemented for keep-alive cronjobs