Download the PHP package bpetheo/yii2-cron without Composer

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

yii2-cron

Cron implementation for yii2 framework. Executes scheduled commands defined in yii config. So if you need to add/remove or reschedule a cron job you only need to modify and deploy the config file, no fiddling with crontab or other actions required. Handy if you are deploying many apps and/or deploy to multiple servers. Only requires server side scripts installed once and it is ready to use. The server side scripts can handle multiple projects (including automatic discovery of added/removed repos). They can be found here: https://github.com/bpetheo/autocron-server

You can also assign tags to jobs, so if you use the same config file on multiple servers you can still have different cron jobs running (or the same jobs with different timings)

The component does some basic logging to runtime/logs/{command}.{action}.{date}.log

Installation

Get via composer: composer require bpetheo/yii2-cron ~1.0.0

Add to the controller map in config/console.php:

Configuration

When setting up timing values you can use the standard cron syntax elements (*, */5, 15, 0,30). The command should be the command/action arguments of ./yii. For example if you would set /path_to_project/yii hello/index in the standard cron tab the command in config you want to use will be hello/index.

Full configuration block looks like this:

You can also use a simplified format by setting only the parameters differing from defaults:

Only command parameter required. Also simple string format like * * * * * controller/action avalible.

Contributing

I've made this project to fit my own needs. You might have different use cases which is not covered, but feel free to extend or modify the code to make it suitable to more people.


All versions of yii2-cron with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
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 bpetheo/yii2-cron contains the following files

Loading the files please wait ....