Separate cron job from template