Improve start detection (use file on /tmp instead of mysql), improve master cron check