Download the PHP package zorac/php-resque-scheduler without Composer

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

PHP Resque Scheduler

php-resque-scheduler is a PHP port of resque-scheduler, which adds support for scheduling items in the future to Resque.

The PHP port of resque-scheduler has been designed to be an almost direct-copy of the Ruby plugin, and is designed to work with a PHP port of resque, php-resque.

At the moment, php-resque-scheduler only supports delayed jobs, which is the ability to push a job to the queue and have it run at a certain timestamp, or in a number of seconds. Support for recurring jobs (similar to CRON) is planned for a future release.

Because the PHP port is almost a direct API copy of the Ruby version, it is also compatible with the web interface of the Ruby version, which provides the ability to view and manage delayed jobs.

Delayed Jobs

To quote the documentation for the Ruby resque-scheduler:

Delayed jobs are one-off jobs that you want to be put into a queue at some point in the future. The classic example is sending an email:

The above will store the job for 1 hour in the delayed queue, and then pull the job off and submit it to the email queue in Resque for processing as soon as a worker is available.

Instead of passing a relative time in seconds, you can also supply a timestamp as either a DateTime object or integer containing a UNIX timestamp to the enqueueAt method:

` NOTE: resque-scheduler does not guarantee a job will fire at the time supplied. At the time supplied, resque-scheduler will take the job out of the delayed queue and push it to the appropriate queue in Resque. Your next available Resque worker will pick the job up. To keep processing as quick as possible, keep your queues as empty as possible.

Worker

Like resque, resque-scheduler includes a worker that runs in the background. This worker is responsible for pulling items off the schedule/delayed queue and adding them to the queue for resque. This means that for delayed or scheduled jobs to be executed, the worker needs to be running.

A basic "up-and-running" resque-scheduler.php file is included that sets up a running worker environment is included in the root directory. It accepts many of the same environment variables as php-resque:

The resque-scheduler worker requires resque to function. The demo resque-scheduler.php worker allows you to supply a RESQUE_PHP environment variable with the path to Resque.php. If not supplied and resque is not already loaded, resque-scheduler will attempt to load it from your include path (require_once 'Resque/Resque.php';')

It's easy to start the resque-scheduler worker using resque-scheduler.php: $ RESQUE_PHP=../resque/lib/Resque/Resque.php php resque-scheduler.php

Event/Hook System

php-resque-scheduler uses the same event system used by php-resque and exposes the following events.

afterSchedule

Called after a job has been added to the schedule. Arguments passed are the timestamp, queue of the job, the class name of the job, and the job's arguments.

beforeDelayedEnqueue

Called immediately after a job has been pulled off the delayed queue and right before the job is added to the queue in resque. Arguments passed are the queue of the job, the class name of the job, and the job's arguments.

Contributors


All versions of php-resque-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
zorac/php-resque Version ^2.9.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 zorac/php-resque-scheduler contains the following files

Loading the files please wait ....