Reduce code duplciation in schedule controller.
Reduce code duplciation in schedule controller.

rafaspinola/jobsworth,webstream-io/jobsworth,evinoca/clockingit,rafaspinola/jobsworth,arunagw/clockingit,rafaspinola/jobsworth,evinoca/clockingit,digitalnatives/jobsworth,ari/jobsworth,ari/jobsworth,xuewenfei/jobsworth,xuewenfei/jobsworth,digitalnatives/jobsworth,evinoca/clockingit,rafaspinola/jobsworth,arunagw/clockingit,digitalnatives/jobsworth,digitalnatives/jobsworth,webstream-io/jobsworth,webstream-io/jobsworth,arunagw/clockingit,xuewenfei/jobsworth,digitalnatives/jobsworth,ari/jobsworth,xuewenfei/jobsworth,evinoca/clockingit,webstream-io/jobsworth,ari/jobsworth