/**
 * The `ClusterCron` module provides a small integration between cron schedules
 * and cluster sharding. It turns a `Cron.Cron` schedule into a `Layer` that
 * coordinates one recurring job across a cluster by registering a singleton for
 * the initial scheduling step and a persisted entity message for each run.
 *
 * This is useful for distributed maintenance work such as periodic cleanup,
 * reconciliation, report generation, cache refreshes, or polling external
 * systems where the job should be owned by the cluster rather than by every
 * runner independently.
 *
 * **Mental model**
 *
 * - {@link make} registers a named cluster cron job as a layer
 * - a singleton schedules the first run for the selected shard group
 * - each run is delivered as a persisted entity message at its scheduled time
 * - after a run exits, the handler schedules the next occurrence
 * - stale runs can be skipped with `skipIfOlderThan`
 *
 * **Gotchas**
 *
 * - Job effects should be idempotent because persisted messages, retries, and
 *   runner failover are part of normal distributed execution.
 * - By default, the next run is calculated from the current time after the
 *   handler exits; use `calculateNextRunFromPrevious` when preserving the
 *   schedule cadence is more important than catching up from delays.
 * - Long outages can produce old scheduled messages; keep `skipIfOlderThan`
 *   aligned with the job's business semantics.
 *
 * @since 4.0.0
 */
import * as Cron from "../../Cron.ts";
import * as Duration from "../../Duration.ts";
import * as Effect from "../../Effect.ts";
import * as Layer from "../../Layer.ts";
import type { Scope } from "../../Scope.ts";
import type { Sharding } from "./Sharding.ts";
/**
 * Creates a layer that runs a cron job through the cluster sharding system.
 *
 * **Details**
 *
 * The job is scheduled as persisted entity messages, with an initial singleton
 * scheduling step and optional controls for shard group, next-run calculation,
 * and skipping stale scheduled runs.
 *
 * @category constructors
 * @since 4.0.0
 */
export declare const make: <E, R>(options: {
    readonly name: string;
    readonly cron: Cron.Cron;
    readonly execute: Effect.Effect<void, E, R>;
    /**
     * Choose a shard group to run this cron job on.
     */
    readonly shardGroup?: string | undefined;
    /**
     * Controls whether the next cron job is based on the time of the previous
     * run.
     *
     * **Details**
     *
     * Defaults to `false`, meaning the next run will be calculated from the
     * current time.
     */
    readonly calculateNextRunFromPrevious?: boolean | undefined;
    /**
     * If set, the cron job will skip execution if the scheduled time is older
     * than this duration.
     *
     * **When to use**
     *
     * Use when this is useful to prevent running jobs that were scheduled too far in the
     * past.
     *
     * **Details**
     *
     * Defaults to "1 day".
     */
    readonly skipIfOlderThan?: Duration.Input | undefined;
}) => Layer.Layer<never, never, Sharding | Exclude<R, Scope>>;
//# sourceMappingURL=ClusterCron.d.ts.map