Fixed cron job scheduling and mySQL code execution