Scheduler Improvements

* Add a locking mechanism to prevent multiple schedulers running at once
* Optimize clean up scheduler
* Extend execution time limit for scheduler (if we can)