Ajax call for the schedule creation button