Download the PHP package smichaelsen/php-cron-scheduler without Composer

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

PHP Cron Scheduler

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

This is a simple cron jobs scheduler inspired by the Laravel Task Scheduling.

Installing via Composer

The raccomended way is to install the php-cron-scheduler is through Composer.

Please refer to Getting Started on how to download and install Composer.

After you have downloaded/installed Composer, run

php composer.phar require peppeocchi/php-cron-scheduler

or add the package to your composer.json

How it works

Instead of adding a new entry in the crontab for each cronjob you have to run, you can add only one cron job to your crontab and define the commands in your .php file.

By default when you schedule a command it will run in background, you can overwrite that behavior by calling ->runInForeground() method.

Jobs that should send the output to email/s are always set to run in foreground

Create your scheduler.php file like this

Then add to your crontab

`

And you are ready to go.

Config

You can pass to the Scheduler constructor an array with your global config for the jobs

The only supported configuration until now is the sender email address when sending the result of a job execution

Jobs execution order

The jobs that are due to run are being ordered by their execution: jobs that can run in background will be executed first

Job types

After creating a new Scheduler instance, you can add few type of jobs

Output

You can send the output of the execution of your cron job either to a file and an email address.

Conditional

You can delegate the execution of a cronjob to a truthful test.

Schedule time

Scheduler uses Cron\CronExpression as an expression parser.

So you can schedule the job using the ->at('myCronExpression') method and passing to that your cron expression (eg. * * * * *) or one of the expression supported by mtdowling/cron-expression

Optionally you can use the "pretty scheduling" that lets you define times in an eloquent way. To do that you should call the ->every() followed by


All versions of php-cron-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
mtdowling/cron-expression Version @stable
swiftmailer/swiftmailer Version @stable
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 smichaelsen/php-cron-scheduler contains the following files

Loading the files please wait ....