Skip to main content

kontiki-scheduler

Declarative cron scheduler for Kontiki deployments.

kontiki-scheduler replaces external crontab or systemd timers with a Kontiki-native service: schedules live in YAML, triggers go through the message bus, and operations stay aligned with the rest of the stack (configuration, logging, registry, supervision).

Role

At each cron tick, the scheduler publishes one event on the bus. Business services react with @on_event handlers. The scheduler does not run domain logic and does not track success or failure — that remains the responsibility of each consumer.

Use kontiki-scheduler for cross-service calendar triggers defined centrally in configuration.

Use @task inside a service for internal periodic work (housekeeping, polling, sub-minute intervals).

Configuration

Schedules are static and loaded at startup. Changing a schedule requires restarting the service.

kontiki:
  amqp:
    url: "amqp://guest:guest@localhost"

scheduler:
  schedules:
    - name: billing.daily_export
      cron: "0 2 * * *"
    - name: reports.weekly_cleanup
      cron: "0 3 * * 0"

Each entry has:

  • name — stable schedule identifier, shared with consuming services
  • cron — standard 5-field expression (minute hour day-of-month month day-of-week)

Timing

  • Granularity: minute
  • Timezone: UTC
  • Poll interval: 60 seconds (fixed)
  • Missed runs: skipped (next tick is computed from the current time, cron-style)
  • Deployment: one scheduler instance per environment (no multi-instance coordination)

Invalid cron expressions or duplicate schedule names cause startup to fail immediately.

Event contract

When a schedule fires, the scheduler publishes:

Field Value
Event type {name}.schedule_task.requested
Payload {}

Example: schedule billing.daily_export publishes billing.daily_export.schedule_task.requested with an empty object.

The name in configuration is the shared contract between scheduler and consumers. The event type is derived from it; consumers subscribe to the full event name in their handler.

Consumer example

from kontiki.messaging import on_event


class BillingService:
    @on_event("billing.daily_export.schedule_task.requested")
    async def run_daily_export(self, payload):
        ...

Quick start

make install          # install dependencies with poetry
make run-amqp         # start RabbitMQ from docker-compose.dev.yaml

make test             # run unit tests
make integration-test # start RabbitMQ (if needed) and run integration tests (behave)

Run the service:

kontiki-scheduler --config /path/to/config.yaml

Out of scope

  • Dynamic scheduling (schedule() / cancel() RPC)
  • One-shot or per-request delayed jobs
  • Execution tracking (succeeded / failed)
  • Sub-minute precision
  • Hot reload of schedules

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for kontiki-scheduler 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kontiki-scheduler 1.0.0
File Size Uploaded Provenance
kontiki_scheduler-1.0.0.tar.gz 6.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kontiki-scheduler 1.0.0
File Interpreter ABI Platform
kontiki_scheduler-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / kontiki_scheduler-1.0.0.tar.gz

Download URL kontiki_scheduler-1.0.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
47bbf4bba6ad991d458e8dd93acbfe7c458873c24b202050a28b3c0d0921eb35
BLAKE2b-256 checksum
How to use checksums
9045a5c9d2cb2048518953d5215c792bc2e80109e6b607e8bc22bafb35eb6eee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.7 Linux/6.8.0-137-generic

Release files / kontiki_scheduler-1.0.0-py3-none-any.whl

Download URL kontiki_scheduler-1.0.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54064a9d113331e88c7db727bea1a11ae7aebea7f1e43c677c73e50786e51685
BLAKE2b-256 checksum
How to use checksums
908fc17acf6f6a9ddc56298d364fa34beefe182a08ec44d90cd2dfa46471e96d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.7 Linux/6.8.0-137-generic

Security for kontiki-scheduler 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page