Refactored example cronjob. Lock is now injected.