Cron check

Reordered existing functions so cron script exits immediately if dashboard is disabled.