Scala schedule and grouping