Download the PHP package creatortsv/scheduler without Composer

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

Scheduler

CI

Stand-alone package which provides functionality to schedule script execution.

Installation


Getting Started

It's easy to start using the scheduler.

The example above just registered simple closure function as a job with default cron expression * * * * * (which means that it will be executed every minute) and run it.

Cron Expression

For complete documentation of the Cron Expression object visit https://github.com/dragonmantank/cron-expression

Each job has its own cron expression object. The register method of the ScheduleRegistrarInterface returns a cron expression object with default value * * * * *. So you can change it after your job had been registered.

Schedule Provider

Sometimes you want to register several jobs that could be grouped by specific logic. In that case Schedule Provider is more useful.

Don't forget to add your provider via scheduler object

Run Scheduler

By default, the Scheduler is running with the current DateTime object for each job, that means it will create the DateTime object and each Cron Expression object using the same timestamp determine if it is the time to execute job or not.

But sometimes you need run your schedule on the specific timestamp, testing for example. Use Scheduler::at method to change default behaviour.


Advanced Usage

Sometimes you may want to control which jobs must be executed in addition of default behaviour. Only one instance of the registered job should be running at the current time, for example.

In that cases you can use Scheduler::boot method instead of Scheduler::run. The boot method returns ScheduleIterator object, each item is a job instance which must be executed by the given timestamp and each key is cron expression of given job.

Let's imagine that you have some service which determines that job is already being executed

So you can use this service

But there is the best way to do so

And you shouldn't have to worry about if the job has different type of callable object


All versions of scheduler with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
dragonmantank/cron-expression Version ^3.3
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 creatortsv/scheduler contains the following files

Loading the files please wait ....