Download the PHP package wolfcode/php-cron without Composer

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

php-cron

中文文档

PHP 8.2+ task scheduler with a fluent API and full lifecycle management.

Features

Requirements

Extension Purpose Required
ext-pcntl Process control: pcntl_fork() (background daemon), signal handling Optional — needed for daemon background mode
ext-posix POSIX: posix_setsid() (new session), posix_kill() (stop daemon) Optional — needed for daemon start/stop
ext-json Task info serialization (.tasks.json PID file) Optional — bundled with PHP by default
ext-opcache opcache_reset() (periodic reset in long-running process) Optional — works fine without

ext-pcntl and ext-posix are CLI-only and unavailable in Web SAPI. If ext-posix is missing, stop falls back to exec("kill ...").

Installation

Quick Start

Timezone

Two levels:

Constant Timezone
Timezone::UTC UTC
Timezone::ASIA_SHANGHAI China (Shanghai)
Timezone::ASIA_HONG_KONG China (Hong Kong)
Timezone::ASIA_TAIPEI China (Taipei)
Timezone::ASIA_TOKYO Japan (Tokyo)
Timezone::ASIA_SEOUL South Korea (Seoul)
Timezone::ASIA_SINGAPORE Singapore
Timezone::ASIA_BANGKOK Thailand (Bangkok)
Timezone::ASIA_MOSCOW Russia (Moscow)
Timezone::EUROPE_LONDON UK (London)
Timezone::EUROPE_PARIS France (Paris)
Timezone::EUROPE_BERLIN Germany (Berlin)
Timezone::AMERICA_NEW_YORK US (New York / Eastern)
Timezone::AMERICA_CHICAGO US (Chicago / Central)
Timezone::AMERICA_LOS_ANGELES US (Los Angeles / Pacific)
Timezone::AUSTRALIA_SYDNEY Australia (Sydney)
Timezone::PACIFIC_AUCKLAND New Zealand (Auckland)

API Reference

Frequency Methods (Parameter-based)

Method Description Example cron
second(3) Every N seconds */3 * * * * *
minute(5) Every N minutes */5 * * * *
hour(2) Every N hours 0 */2 * * *
day(3) Every N days 0 0 */3 * *
week(2) Every N weeks 0 0 * * 0 + week filter
month(6) Every N months 0 0 1 */6 *

Semantic Methods

Method Cron expression
hourly() 0 * * * *
hourlyAt(30) 30 * * * *
daily() 0 0 * * *
dailyAt('8:30') 30 8 * * *
twiceDaily(1, 13) 0 1,13 * * *
weekly() 0 0 * * 0
weeklyOn('monday', '9:00') 0 9 * * 1
monthly() 0 0 1 * *
monthlyOn(15, '14:30') 30 14 15 * *
quarterly() 0 0 1 1,4,7,10 *
yearly() 0 0 1 1 *
weekdays() 0 0 * * 1-5
weekends() 0 0 * * 0,6
lastDayOfMonth() 0 0 28-31 * * + filter

Custom Expression

Constraints

Hooks

Others

License

MIT


All versions of php-cron 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 wolfcode/php-cron contains the following files

Loading the files please wait ...