Update the code to handle the cron job run every 10 minutes