fix logic in cron_job class method for if option