Changed scheduler to actually write the cron schedule