Download the PHP package azaharizaman/nexus-scheduler without Composer

On this page you can find all versions of the php package azaharizaman/nexus-scheduler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nexus-scheduler

Nexus\Scheduler

A framework-agnostic job scheduling engine that manages future-dated instructions through contracts, delegating execution to domain packages and persistence to the application layer.

Overview

The Nexus\Scheduler package serves as the central repository for future-dated instructions. It manages when an action should happen, but delegates what the action is (domain logic) and how the action is executed (job runner/queue).

Core Principles

  1. Complete Decoupling: Stateless design with all persistence via ScheduleRepositoryInterface
  2. Execution Agnostic: Unaware of runtime environment (Laravel Queue, pure Cron, etc.)
  3. Handler-Based: Domain packages implement JobHandlerInterface for their specific job types
  4. Time Control: Testable via ClockInterface injection
  5. Hybrid Retry: Handlers signal intent, engine manages execution

Architecture

The Scheduling Paradigm

Execution Flow

  1. Scheduling Phase (Domain → Scheduler)

    • Domain package calls $scheduler->schedule(ScheduleDefinition)
    • ScheduleManager creates ScheduledJob value object
    • Persists via ScheduleRepositoryInterface
  2. Execution Phase (Cron → Queue → Handler)

    • External cron job calls ProcessScheduledJobs command
    • Command retrieves due jobs via $manager->getDueJobs()
    • For each job, dispatches to queue via JobQueueInterface
    • Queue worker invokes appropriate JobHandlerInterface::handle()
    • Handler returns JobResult with retry intent
    • ExecutionEngine updates status and re-queues if needed
  3. Retry Strategy (Hybrid Delegation)
    • Handler decides: "Should retry? Custom delay?"
    • Engine executes: Status update, queue dispatch, exponential backoff
    • Clean separation: Domain logic (intent) vs. Infrastructure (mechanism)

Installation

1. Install Package

2. Optional: Install Cron Expression Support

3. Implement Required Contracts in Your Application

4. Bind Interfaces in Service Provider

Usage

1. Schedule a Job

2. Implement a Job Handler

3. Register Handler (Tagged Service)

4. Process Scheduled Jobs (Cron)

Add to your cron:

Handler Registration Pattern

The package uses tagged services for handler discovery, avoiding tight coupling to concrete domain classes.

Domain Package Responsibility

  1. Implement JobHandlerInterface
  2. Tag in service provider: $app->tag([YourHandler::class], 'scheduler.handlers')

Scheduler Package Responsibility

  1. Receive iterable $handlers via constructor injection
  2. Build internal JobType => HandlerInterface mapping
  3. Dispatch to appropriate handler based on job type

Zero coupling: The scheduler never knows concrete handler class names.

Retry Strategy

Hybrid Delegation Model

Handler (Domain Logic): Decides retry intent

ExecutionEngine (Infrastructure): Manages retry mechanism

Decision Flowchart

Value Objects

ScheduledJob

Immutable representation of a scheduled job with business logic methods:

ScheduleRecurrence

Defines repetition rules:

JobResult

Handler's response with retry intent:

Enums

JobType

Extensible enum for domain-specific job types:

JobStatus

Lifecycle state with transition validation:

Testing

Time Control

Use ClockInterface for deterministic testing:

Running the Package Test Suite

The Scheduler package now ships with a dedicated PHPUnit 11 smoke suite plus deterministic in-memory adapters under tests/Support/. Run it locally before contributing new functionality:

What the suite covers today:

Future work will extend coverage across value objects, the recurrence engine, and execution engine edge cases. Contributions should include corresponding tests that reuse the provided adapters or add new deterministic doubles inside tests/Support/.

Future Features (v2)

Calendar Export

The CalendarExporterInterface is defined but bound to NullCalendarExporter (throws FeatureNotImplementedException) in v1.

Planned v2 features:

📖 Documentation

Package Documentation

Additional Resources

License

MIT License - see LICENSE file for details.

Support

For issues, questions, or contributions, please refer to the main Nexus ERP repository.


All versions of nexus-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/log Version ^3.0
dragonmantank/cron-expression Version ^3.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package azaharizaman/nexus-scheduler contains the following files

Loading the files please wait ...