Download the PHP package bileto/cronner without Composer

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

Cronner PHP Composer

Description

Simple tool which helps with maintenance of cron tasks.

It requires PHP >= 8.0 and Nette Framework >= 3.0.

Usage

It is very simple to use it because configuration is only in method annotations. Example class with tasks follows.

It is recommend to use compiler extension.

It does not require any configuration however your own implementation of timestamp storage could be better then the default storage. Your storage must be defined as a service in config.neon and Cronner will find it. However you can specify service manually if it is not autowireable.

Or you can change the directory for default storage.

It is also possible to define maxExecutionTime for Cronner so you do not have make it by you own code (and probably for all your requests). Option criticalSectionTempDir can be change however the directory must be writable for php process. It is used to run each task only once at time.

At the end you would need to specify your task objects. It would be some service with high probability. You can add tag cronner.tasks to all services with Cronner tasks and those services will be bind automatically. However you can still add new task objects by your own using addTasks method.

Then you can use it very easily in Presenter

or in Command from Kdyby/Console.

Service configuration is also possible but it should not be used using new versions of Nette because extension usage is recommended and preferable way. However you will still need to call run method somewhere in your Presenter or console Command.

Annotations

@cronner-task

This annotations is required for all public methods which should be used as a task. Its value is used as a name of task. If the value is missing the name is build from class name and method name.

If this annotation is single (for Cronner) in task method comment then the task is run every time when Cronner runs.

Note: Magic methods cannot be used as task (__construct, __sleep, etc.).

Example

@cronner-period

Not required but recommended annotation which specifies period of task execution. The period is minimal time between two executions of the task. It's value can be anything what is acceptable for strtotime() function. The only restriction is usability with "+" sign before the time because it is added by Cronner automatically. So first day of this month is not acceptable however 1 month is acceptable.

Attention! The value of this annotation must not contain any sign (+ or -).

Example

@cronner-days

Allows run the task only on specified days. Possible values are abbreviations of week day names. It means Mon, Tue, Wed, Thu, Fri, Sat and Sun. There are two shortcuts for easier usage: working days (Mon, Tue, Wed, Thu, Fri) and weekend (Sat and Sun) which are internally expanded to specific days. Multiple values must be separated by comma (Mon, Wed, Fri) or can be specified by range Mon-Thu.

Example

@cronner-time

Specifies day time range (or ranges) in which the task can be run. It can be range or a specific minute. It uses 24 hour time model. Multiple values must be separated by comma.

The time can be defined over midnight as it is in following example.

Note: There is tolerance time of 5 seconds to run task as soon as possible if previous run have had slower start from any reason.

Example


All versions of cronner with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
tracy/tracy Version ^2.6
nette/di Version ^3.0
nette/bootstrap Version ^3.0
nette/utils Version ^3.0
nette/reflection Version ^2.4
nette/safe-stream Version ^2.4
bileto/critical-section Version ^2.1
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 bileto/cronner contains the following files

Loading the files please wait ....