Would be safer to return nothing, execute methods don't have a return. I understand this return 2 was inherited from the previous cron function.
Also changed the scheduled task to run every hour.
Replace enrolment plugin flatfile cron processing with scheduled task