Added state in cron tasks.