Download the PHP package lsr/scheduler without Composer

On this page you can find all versions of the php package lsr/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 scheduler

LSR Scheduler

lsr/scheduler provides Nette DI integration for the standalone Symfony Scheduler. Scheduled jobs are application services, so their definitions and timing ship in the same repository and deployment as the application.

Requirements

Installation

Configuration and jobs

Register the extension in the application DI configuration:

Define a job service and its schedule:

Each job implements SchedulerJobInterface:

Use every instead of cron for interval-based jobs. Exactly one trigger must be configured:

The extension registers the scheduler:run command for lsr/console. Run it as a long-lived process:

Diagnose schedules

The extension also registers Symfony Scheduler's debug:scheduler command. It lists every configured job and attributed command with its trigger, provider name, and next run:

Pass --date='2026-01-01 00:00:00 UTC' to calculate next runs from a fixed time. Pass --all to include recurring messages whose trigger has terminated. The integration exposes its single schedule under Symfony's conventional default name.

For RoadRunner, supervise the command as a service alongside the application workers:

Persistent state and locking

Symfony Scheduler can remember the last run and prevent multiple replicas from processing the same schedule. Install compatible Symfony Cache and Lock implementations, define their services, then reference them:

The lock service must implement Symfony\Component\Lock\LockInterface; the state service must implement Symfony\Contracts\Cache\CacheInterface. If multiple containers run the scheduler, both services must use shared storage.

Scheduled work should be idempotent. Long-running or retryable work is usually best dispatched to RoadRunner jobs from the scheduled job service.

Scheduling console commands

Console commands registered as DI services can schedule themselves with Symfony Scheduler's repeatable attributes. The scheduler extension discovers them during DI compilation, just like lsr/console discovers AsCommand:

Both attributes are repeatable. Their arguments value may be a Symfony ArrayInput-style array or a command-line string:

Scheduled commands run non-interactively in the scheduler process. A non-zero exit code fails the scheduler run so the supervising process can report and restart it. The standalone integration supports the default schedule, command arguments, timezones, intervals, and jitter; Symfony Messenger transports and method-based task attributes are intentionally not supported.

Integration reference

The configuration schema and command discovery are defined in SchedulerJobContext exposes the job ID, scheduled execution time and optional next scheduled time. sleep is the scheduler's polling sleep in microseconds.

The examples above illustrate application-owned job and command definitions: replace their bodies with the application's actual work and define any shown command arguments/options. bin/console is the application's entry point, not an executable installed by this package.

SchedulerRunnerInterface provides run() and stop() for custom process integration. The bundled command requests a stop on supported SIGINT/SIGTERM signals. Job and command lifecycle hooks are available in src/Lifecycle for instrumentation.

Development

CI runs the checks below on PHP 8.4 and 8.5. From a package checkout:

composer cs checks coding style without changing files. Run composer cs:fix (or composer cbf) to apply PHP CS Fixer rules from .php-cs-fixer.php.

The suite needs no external services or persistent cache/lock implementation. Install the DOM, mbstring, XML and XMLWriter extensions for PHPUnit. The composer test script enables Xdebug coverage; the CI command explicitly disables coverage collection.

AI coding assistance

See LSR Skills for AI agent skills for working with the LSR framework.

License

Licensed under the MIT License.


All versions of scheduler with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
dragonmantank/cron-expression Version ^3.6
nette/di Version ^3.2
psr/container Version ^2.0
symfony/console Version ^8|^7
symfony/scheduler Version ^8|^7.4
symfony/service-contracts Version ^3.0
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 lsr/scheduler contains the following files

Loading the files please wait ...