[#BloombergLP-bdlmt-EventScheduler-scheduleRecurringEventRaw-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/EventScheduler.adoc[EventScheduler]::scheduleRecurringEventRaw
:relfileprefix: ../../../
:mrdocs:

Schedule a recurring event that invokes the specified `callback` at every specified `interval` truncated to microseconds, with the first event dispatched at the optionally specified `startEpochTime` truncated to microseconds&period; If `startEpochTime` is not specified, the first event is dispatched at one `interval` from now&period; Load into the specified `event` pointer a handle that can be used to cancel the event (by invoking `cancelEvent`)&period; The `startEpochTime` is an absolute time represented as an interval from some epoch, which is determined by the clock associated with the time point&period; The `event` pointer must be released by invoking `releaseEventRaw` when it is no longer needed&period; The behavior is undefined unless `interval` is at least one microsecond&period; Note that if `startEpochTime` is in the past, the first event is dispatched immediately, and additional `(now() &hyphen; startEpochTime) &sol; interval` events will be submitted serially&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;CLOCK,
    class t&lowbar;REP&lowbar;TYPE,
    class t&lowbar;PERIOD&lowbar;TYPE,
    class t&lowbar;DURATION&gt;
void
scheduleRecurringEventRaw(
    xref:BloombergLP/bdlmt/EventScheduler/RecurringEvent.adoc[RecurringEvent]** event,
    bsl::chrono::duration&lt;t&lowbar;REP&lowbar;TYPE, t&lowbar;PERIOD&lowbar;TYPE&gt; const& interval,
    xref:bsl/function-0a.adoc[bsl::function&lt;void()&gt;] const& callback,
    bsl::chrono::time&lowbar;point&lt;t&lowbar;CLOCK, t&lowbar;DURATION&gt; const& startEpochTime = t&lowbar;CLOCK&colon;&colon;now());
----


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