public void schedule(TimerTask task, Instant time) {
        timer.schedule(new TimerTaskWrapper(task), Date.from(time));
    }
Schedules the specified task for execution at the specified time.  If
the time is in the past, the task is scheduled for immediate execution.

@param task task to be scheduled.
@param time time at which task is to be executed.
@throws IllegalArgumentException if {@code time.getTime()} is negative.
@throws IllegalStateException if task was already scheduled or
        cancelled, timer was cancelled, or timer thread terminated.
xmppserver/src/main/java/org/jivesoftware/util/TaskEngine.java