Add basic cronjob functionality. Fix typo stopping compilation