version E: write schedule progs to database