[#BloombergLP-balm-PublicationScheduler-scheduleCategory-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/PublicationScheduler.adoc[PublicationScheduler]::scheduleCategory
:relfileprefix: ../../../
:mrdocs:

Schedule `category` for periodic publication at `interval`&period;

== Synopsis

Declared in `&lt;balm&lowbar;publicationscheduler&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
scheduleCategory(
    xref:BloombergLP/balm/Category.adoc[Category] const* category,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& interval);
----

== Description

Schedule the specified `category` to be published periodically at the specified `interval` using the `MetricManager` supplied at construction&period; If `category` has _already_ been scheduled, change the scheduled period to `interval`&semi; any previously scheduled publication of `category` is either canceled or completed (atomically) prior to rescheduling&period; If a category is rescheduled with the same `interval` as it is currently scheduled, this operation has no effect&period; The behavior is undefined unless `bsls&colon;&colon;TimeInterval(0, 0) &lt; interval` and `category` is a valid address supplied by the `balm&colon;&colon;MetricRegistry` owned by the `MetricsManager` object supplied at construction&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| category to schedule for periodic publication
| *interval*
| periodic publication interval for `category`
|===


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