Download the PHP package philiprehberger/cron-expression-builder without Composer

On this page you can find all versions of the php package philiprehberger/cron-expression-builder. 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 cron-expression-builder

PHP Cron Expression Builder

Tests Latest Version on Packagist Last updated

Fluent cron expression builder with human-readable methods.

Requirements

Installation

Usage

Static Shortcuts

Use the Cron class for common schedules:

Preset Intervals

Use builder presets for common intervals:

Custom Builder

Build complex expressions with the fluent builder:

The builder implements Stringable, so you can use it directly in string contexts:

Next Run Date

Calculate the next execution time from a cron expression:

Next N Run Dates

Calculate multiple upcoming execution times:

Overlap Detection

Check if cron schedules produce overlapping execution times:

Interval Analysis

Analyze the timing intervals between cron runs:

Validator

Validate cron expression syntax:

Describer

Get human-readable descriptions:

API

Method Returns Description
Cron::everyMinute() string Every minute (* * * * *)
Cron::everyFiveMinutes() string Every 5 minutes (*/5 * * * *)
Cron::everyTenMinutes() string Every 10 minutes (*/10 * * * *)
Cron::everyFifteenMinutes() string Every 15 minutes (*/15 * * * *)
Cron::everyThirtyMinutes() string Every 30 minutes (*/30 * * * *)
Cron::hourly() string Every hour at :00 (0 * * * *)
Cron::hourlyAt(int $minute) string Every hour at given minute
Cron::daily() string Every day at midnight (0 0 * * *)
Cron::dailyAt(string $time) string Every day at HH:MM
Cron::weekly() string Every Sunday at midnight
Cron::weeklyOn(int $day, string $time) string Weekly on given day at time
Cron::monthly() string First of month at midnight
Cron::monthlyOn(int $day, string $time) string Monthly on given day at time
Cron::yearly() string January 1st at midnight
Cron::custom() CronBuilder Start fluent builder
CronBuilder::everyQuarterHour() self Set minute to */15
CronBuilder::everyHalfHour() self Set minute to */30
CronBuilder::weeklyOnDay(string $dayName) self Set day of week by English name
CronExpression::nextRunDate(?DateTimeInterface $from) DateTimeImmutable Next execution time
CronExpression::nextRuns(int $count, ?DateTimeInterface $from) array Next N execution times
CronScheduler::nextRuns(string\|CronExpression $expr, int $count, ?DateTimeInterface $from) array Next N run dates
CronScheduler::overlaps(string\|CronExpression $a, string\|CronExpression $b, int $windowHours, ?DateTimeInterface $from) bool Check if two schedules overlap
CronScheduler::findOverlaps(array $expressions, int $windowHours, ?DateTimeInterface $from) array Find all overlapping pairs
CronInterval::averageInterval(string\|CronExpression $expr, int $sampleSize, ?DateTimeInterface $from) float Average seconds between runs
CronInterval::minInterval(string\|CronExpression $expr, int $sampleSize, ?DateTimeInterface $from) float Minimum seconds between runs
CronInterval::maxInterval(string\|CronExpression $expr, int $sampleSize, ?DateTimeInterface $from) float Maximum seconds between runs
CronValidator::isValid(string $expr) bool Validate cron syntax
CronDescriber::describe(string $expr) string Human-readable description

Development

Support

If you find this project useful:

Star the repo

🐛 Report issues

💡 Suggest features

❤️ Sponsor development

🌐 All Open Source Projects

💻 GitHub Profile

🔗 LinkedIn Profile

License

MIT


All versions of cron-expression-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 philiprehberger/cron-expression-builder contains the following files

Loading the files please wait ...