Add limit to pending schedules method
Add schedules test