First version of automatic scheduling done.