Create heartbeat.py

control of service or cronjob