Download the PHP package lordsimal/cakephp-scheduler without Composer

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

CakePHP Scheduler Plugin

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require codecov

What can this plugin do?

This tool allows you to move all your cron jobs from being server configured via crontab to being app controlled in your CakePHP application (and plugins).

Requirements

Installation

Loading plugin

In Application.php

Or use the cake CLI.

Usage

Defining a schedule

Either your app or your plugin need to implement the CakeSchedulerInterface which will add the schedule(Scheduler &$scheduler) method.

with the ->execute() method you define which Command should be executed.

Each ->execute() method will return a \CakeScheduler\Scheduler\Event instance which is used to tell the scheduler when the command should be executed.

Available frequencies

Method Run the command
->cron('* * * * *'); with the exact cron config
->everyMinute(); every minute
->everyXMinutes(5); every 5 minutes
->hourly(); every hour
->everyOddHour(); every odd hour
->everyXHours(4); every 4 hours
->hourlyAt(37); every hour at 37 minutes
->hourlyAt([15, 30, 45]); every hour at 15, 30 and 45 minutes
->daily(); every day at midnight
->dailyAt('13:08'); every day at 13:08
->twiceDailyAt(3, 15, 5); every day at 03:05 and 15:05
->weekly(); every sunday at 00:00
->weeklyOn(Event::MONDAY, '8:00'); every week on monday at 08:00
->monthly(); on the first day of the month at midnight
->monthlyOn(4, '15:00'); on the 4th of the month at 15:00
->twiceMonthly(1, 16, '13:00'); on the 1st and 16th of the month at 13:00
->lastDayOfMonth('12:00'); on the last day of the month at 12:00
->weekdays(); from monday to friday
->weekends(); on saturday and sunday
->mondays(); on every monday
->tuesdays(); on every tuesday
->wednesdays(); on every wednesday
->thursdays(); on every thursday
->fridays(); on every friday
->saturdays(); on every saturday
->sundays(); on every sunday
->days([Event::MONDAY, Event::THURSDAY]); on every monday and thursday
->quarterly(); on the first day of the quarter at midnight
->quarterlyOn(5, '08:00'); on the 5th day of the quarter at 08:00
->yearly(); on the first day of the year at midnight
->yearlyOn(4, '5', '15:00'); on the 5th of april at 15:00 every year

Also see the EventTest for all the available options

List all scheduled events

Running the Scheduler

You still need the following entry in your crontab

Credit where credit is due

This plugin is heavily inspired by the Laravel Task Scheduling Feature

License

The plugin is available as open source under the terms of the MIT License.


All versions of cakephp-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
dragonmantank/cron-expression Version ^3.3
cakephp/cakephp Version ^5.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 lordsimal/cakephp-scheduler contains the following files

Loading the files please wait ....