            :status :running
            :timeline timeline
            :scheduled-future (schedule-next
-                              clock
                               (first timeline)
-                              executor
-                              #(callback state timeline clock trigger executor promise))
+                              {:clock clock
+                               :executor executor
+                               :callback #(callback state timeline {:clock clock :trigger trigger :executor executor :promise promise})})
            :clock clock
            :executor executor)
     promise)

              clock (:clock st)]
          (swap! state (fn [st] (-> st (assoc :status :running
                                              :scheduled-future (schedule-next
                                                                 clock
                                                                 (first timeline)
                                                                 executor
                                                                 #(callback state timeline clock trigger executor promise)))))))
        :ok)))

  (stop [_]

  ([colls]
   (merge-timelines compare colls)))

(defn schedule-next [next-time {:keys [clock executor callback]}]
  (when next-time
    (let [dly (.until (.instant clock) next-time ChronoUnit/MILLIS)]
      (.schedule executor ^Callable callback dly TimeUnit/MILLISECONDS))))

(defn callback [state timeline {:keys [clock trigger executor promise] :as opts}]
  (let [[due next-timeline] (split-with #(not (.isAfter (.toInstant %) (.instant clock))) timeline)]

    (if-not (empty? next-timeline)
