Download the PHP package queencitycodefactory/cakephp-scheduler without Composer

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

Makes scheduling tasks in CakePHP much simpler.

Author

Trent Richardson [http://trentrichardson.com]

License

Copyright 2015 Trent Richardson

You may use this project under MIT license. http://trentrichardson.com/Impromptu/MIT-LICENSE.txt

How It Works

SchedulerShell works by scheduling one cron (SchedulerShell) for your project. Then in bootstrap.php you can create intervals for all your tasks. Deploying new scheduled tasks are now much easier; one crontab entry executes all your tasks.

Install

This Shell was developed for CakePHP 3.

Composer Installation (recommended)

In your project's composer.json file add this to your require:

`

Manual Installation

Copy the Scheduler plugin into your App/Plugin folder and rename the folder to Scheduler.

Load the Plugin

In your bootstrap.php file add either:

or

Schedule a single system cron by the shortest interval you need for SchedulerShell.php. For example, if you have 5 tasks and the most often run is every 5 minutes, then schedule this cron to run at least every 5 minutes. For more help see Shells as Cron Jobs.

Example cron job:

`

This would run the SchedulerShell every 5 minutes.

Now once this shell is scheduled we are able to add our entries to bootstrap.php. Lets say we want to schedule a CleanUp task daily at 5am and a NewsletterTask for every 15 minutes.

The key to each entry will be used to store the previous run. These must be unique!

interval is set one of two ways. 1) For set times of day we use PHP's relative time formats: "next day 5:00".

2) To use an interval to achieve "every 15 minutes" we use DateInterval string format: "PT15M".

task is simply the name of the Task.

There are a couple optional arguments you may pass: "action" and "pass".

action defaults to "execute", which is the method name to call in the task you specify.

pass defaults to [], which is the array of arguments to pass to your "action".

Storage of Results

SchedulerShell keeps track of each run in a json file. By default this is stored in TMP and is named "cron_scheduler.json".

If you need to change either of these you may use:

Preventing Simultaneous SchedulerShells Running Same Tasks

By default, the SchedulerShell will exit if it is already running and has been for less than 10 minutes. You can adjust this by setting:

This works by creating a flag file while the process is running, and deleting this file once it is complete. If the file exists, but is older than the timeout specified the scheduler will continue. Although you shouldn't need to, you can change the name of this file:

Other Notes/Known Issues

Contributing

Contributions are much appreciated. Before you burn up too much time on a fix, check the posted issues, pull requests, and branches to see if someone has addressed the issue.

When making changes keep in mind the master branch is always the latest stable version. I do not apply changes directly to this branch, but rather to the cakephp-v* branches. When the latest cakephp version's branch is stable I tag it and merge it with master.

The quick overview:


All versions of cakephp-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.6
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 queencitycodefactory/cakephp-scheduler contains the following files

Loading the files please wait ....