[#BloombergLP-bdlmt-TimerEventScheduler-scheduleEvent]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/TimerEventScheduler.adoc[TimerEventScheduler]::scheduleEvent
:relfileprefix: ../../../
:mrdocs:

Schedule the specified `callback` to be dispatched at the specified `time`&period; On success, return a handle that can be used to cancel the `callback` (by invoking `cancelEvent`), or return `e&lowbar;INVALID&lowbar;HANDLE` if scheduling this event would exceed the maximum number of scheduled events for this object (see constructor)&period; Optionally specify `key` to uniquely identify the event&period; The `time` is an absolute time represented as an interval from some epoch, which is detemined by the clock indicated at construction (see &lsqb;&rsqb;Clock&hyphen;Types))&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;timereventscheduler&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlmt/TimerEventScheduler/Handle.adoc[Handle]
scheduleEvent(
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& time,
    xref:bsl/function-0a.adoc[bsl::function&lt;void()&gt;] const& callback,
    xref:BloombergLP/bdlmt/TimerEventScheduler/EventKey.adoc[EventKey] const& key = EventKey(0));
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
