@@ -0,0 +1,1392 @@
+package io.bootique.metrics.health.heartbeat;%0A%0Aimport com.google.inject.Provider;%0Aimport io.bootique.cli.Cli;%0Aimport io.bootique.command.CommandOutcome;%0Aimport io.bootique.command.CommandWithMetadata;%0Aimport io.bootique.meta.application.CommandMetadata;%0A%0A/**%0A * A command that starts the application heartbeat.%0A *%0A * @since 0.25%0A */%0Apublic class HeartbeatCommand extends CommandWithMetadata %7B%0A%0A    private Provider%3CHeartbeat%3E heartbeatProvider;%0A%0A    public HeartbeatCommand(Provider%3CHeartbeat%3E heartbeatProvider) %7B%0A        super(createMetadata());%0A        this.heartbeatProvider = heartbeatProvider;%0A    %7D%0A%0A    private static CommandMetadata createMetadata() %7B%0A        return CommandMetadata.builder(HeartbeatCommand.class)%0A                .description(%22Schedules a %5C%22heartbeat%5C%22 in-app process that wakes up periodically and runs a set of %22 +%0A                        %22preconfigured application healthchecks.%22)%0A                .build();%0A    %7D%0A%0A    @Override%0A    public CommandOutcome run(Cli cli) %7B%0A%0A        heartbeatProvider.get().start();%0A%0A        // until %22start and get out%22 strategy is implemented per https://github.com/bootique/bootique/issues/197%0A        // let's block indefinitely like we do in Jetty and jobs modules.%0A        try %7B%0A            Thread.currentThread().join();%0A        %7D catch (InterruptedException ie) %7B%0A        %7D%0A%0A        return CommandOutcome.succeeded();%0A    %7D%0A%7D%0A

Implement "heartbeat" - a scheduler that executes a group of health checks #19