// Remove duplicate maintenance_timeslot with same start_date, end_date and maintenance_id
awaitR.exec("DELETE FROM maintenance_timeslot WHERE id NOT IN (SELECT MIN(id) FROM maintenance_timeslot GROUP BY start_date, end_date, maintenance_id)");
letlist=awaitR.find("maintenance_timeslot"," generated_next = 0 AND start_date <= DATETIME('now') ");