Search by

adachsoft / automation-json-file

Arkadiusz Adach

JSON file-backed repositories for automation schedules and runtime state.

Package info

gitlab.com/a.adach/automation-json-file

Issues

pkg:composer/adachsoft/automation-json-file

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-22 19:58 UTC

This package is auto-updated.

Last update: 2026-11-22 18:59:26 UTC


README

Framework-free JSON file-backed repositories for automation schedules, schedule runtime state, and fired-occurrence markers. The package implements the repository contracts from adachsoft/automation-contracts and requires PHP 8.3 or later.

Requirements

  • PHP 8.3 or later.
  • Composer.

Features

  • Persist schedules, runtime state, and fired-occurrence markers in separate JSON documents.
  • Use shared and exclusive file locks and atomic file replacement for safe local-file updates.
  • Record occurrence markers atomically to prevent the same occurrence from being marked twice.
  • Prune old markers according to an application's retention policy.

Installation

composer require adachsoft/automation-json-file

Usage

Create the repositories with writable file paths and provide them to your automation runtime. Schedule mapping also requires a recurrence-rule normalizer; the adachsoft/recurrence package provides one. See the repository setup example.

Use a shared local filesystem for processes accessing the same documents. Each document is updated atomically on its own; operations across multiple documents are not transactional. Fired markers provide at-most-once behavior, not exactly-once execution: a process may stop after recording a marker and before running its actions.