semitexa/scheduler

Semitexa Scheduler — recurring and delayed background jobs with storage-backed planning, lease-based workers, and overlap protection

Maintainers

Package info

github.com/semitexa/semitexa-scheduler

Type:semitexa-module

pkg:composer/semitexa/scheduler

Statistics

Installs: 31

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

2026.04.05.0855 2026-04-05 08:31 UTC

This package is auto-updated.

Last update: 2026-04-05 09:00:34 UTC


README

Recurring and delayed background jobs with lease-based workers, retry logic, and overlap protection.

Purpose

Manages scheduled job execution. Jobs are persisted via ORM, leased by workers with heartbeat monitoring, and retried with exponential backoff on failure. Cron expressions define recurring schedules.

Role in Semitexa

Depends on semitexa/core, semitexa/orm, and semitexa/tenancy. Uses dragonmantank/cron-expression for schedule parsing. Jobs execute within tenant context when tenancy is active.

Key Features

  • Cron-based recurring job scheduling
  • Lease-based worker execution with heartbeat
  • Exponential backoff retry via RetryScheduler
  • Overlap protection (one execution per schedule)
  • RunStatus state machine (pending, running, completed, failed)
  • Tenant-isolated job execution

Notes

The scheduler is designed for Swoole long-running processes. Workers maintain leases via heartbeat and release them on graceful shutdown.