log every minute if the machiene is running and send every day a email