Schedule logic mostly working