Learning-Based Economic Control for Repetitive Systems