Download the PHP package buzzingpixel/php-scheduler without Composer

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

BuzzingPixel PHP Scheduler

A fairly simple php scheduling system you can add to nearly any PHP app that utilizes a PSR-11 container.

Drivers

At the moment, the only driver supplied with this package is the Redis driver. But if you want to supply your own driver, just implement the \BuzzingPixel\Scheduler\ScheduleHandler interface and wire your container to supply that when the interface is requested.

Otherwise, wire \BuzzingPixel\Scheduler\ScheduleHandler to supply the \BuzzingPixel\Scheduler\RedisDriver\RedisScheduleHandler.

PHP's \Redis and the Symfony \Symfony\Component\Cache\Adapter\RedisAdapter will need to also be available through the constructor/container.

Usage

ScheduleFactory

You will need to implement the \BuzzingPixel\Scheduler\ScheduleFactory and make it available through your container and configure to send whatever scheduled items you want.

Example:

Midnight Strings

If you utilize the Frequency midnight strings, you might want to be able to control the timezone. Since system timezone can be unreliable and/or it's recommended practice to set that to UTC, this package does not rely on the system's timezone. What you can do instead is send your own newed up instance of \BuzzingPixel\Scheduler\SchedulerTimeZone through the container.

Here's an example:

Running the schedule

Once your configuration is in place and you've set up some scheduled jobs to run, you need to set up something to call \BuzzingPixel\Scheduler\ScheduleHandler::runSchedule every minute. You can use a cron, or set up a Docker image or whatever works best in your environment.

Command to run schedule

This package provides a Symfony console command which you can use if you're using Symfony Console (or Silly, which is my preference). Load up \BuzzingPixel\Scheduler\Framework\RunScheduleSymfonyCommand through your container, and add it to your Symfony console app.

Then in your cron or Docker setup run the command buzzingpixel-schedule:run (unless you've changed the command name) every minute through your CLI app.

Changing the command name

If you'd like to change the command name, you can do so through the name constructor parameter of the RunScheduleSymfonyCommand class. Configure your DI to provide the command name you would prefer.


All versions of php-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
lcobucci/clock Version ^3.1
psr/clock Version ^1.0
spatie/php-cloneable Version ^1.0
symfony/cache Version ^6.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 buzzingpixel/php-scheduler contains the following files

Loading the files please wait ....