Online convex optimization for cumulative constraints