Download the PHP package eclipxe/php-soft-daemon without Composer

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

eclipxe/php-soft-daemon

Source Code Packagist PHP Version Support Latest Version Software License Build Status Scrutinizer Coverage Status Total Downloads

PHP SoftDaemon Library

SoftDaemon provides a library to run continuously some code.

I create this library to execute procedures continuously and to manipulate the time between iterations. I also use it to send signals to the processes in order to manipulate the behavior of the execution.

Do not reinvent the wheel, if cron jobs are suitable to you then use them.

How it runs

You have to create an instance of SoftDaemon, it requires minimum an Executable object that implements SoftDaemon\Executable interface

The SoftDaemon\Executable interface requires that you create two methods:

For example, you can use signalHandler($signo) to process SIGHUP.

Once you have instantiated a SoftDaemon object you can call the method run(). This method will enter into a loop and run Executable::runOnce() on every iteration. At the end on every iteration the loop will wait.

Signals used

These signals are catched by SoftDaemon. All signals pass to Executable::signalHandler($signo) before `SoftDaemon do its own processing.

How SoftDaemon knows how many seconds will wait

The pause state determines the quantity of seconds to wait for signals and continue to the next iteration.

If the SoftDaemon is on pause then it will not call runOnce, it will only try to wait 1 second.

If not on pause then it will use the counter of errors and request the sequencer to determine the number of seconds to wait.

The result of Executable::runOnce(): bool determines the number of errors. It is reset to zero when runOnce() returns true. It is increased by 1 when runOnce() returns false.

Anyhow, the number of seconds will be bounded to MinWait and MaxWait properties.

About sequencers

A sequencer is an objects that implements SoftDaemon\Sequencer. Its purpose is to receive the number of errors and return a quantity of seconds to wait. There are some predefined Sequencers already defined in the namespace SoftDaemon\Sequencer:

You can create a sequencer with your own rules. The MinWait and MaxWait limit the boundaries of seconds returned by the sequencer.

PHP Support

This library is compatible with at least the oldest PHP Supported Version with active support. Please, try to use PHP full potential.

We adhere to Semantic Versioning. We will not introduce any compatibility backwards change on major versions.

Internal classes (using @internal annotation) are not part of this agreement as they must only exist inside this project. Do not use them in your project.

Contributing

Contributions are welcome! Please read CONTRIBUTING for details and don't forget to take a look the TODO and CHANGELOG files.

Copyright and License

The eclipxe/php-soft-daemon library is copyright © Carlos C Soto and licensed for use under the MIT License (MIT). Please see LICENSE for more information.


All versions of php-soft-daemon with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-pcntl 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 eclipxe/php-soft-daemon contains the following files

Loading the files please wait ....