Fix the logic inside the schedule_index cronjob.

Currently if there are more than one scheduled job, it would only run the first one it found. Then it would run the 'tag_aggregation' fallback for every cron job.

Fixes should be self explanatory.