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.
Replace enrolment plugin flatfile cron processing with scheduled task