Download the PHP package sinclairt/schedulable without Composer

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

Schedulable

Installation

Usage

Use the IsSchedulable trait inside your model. This will give you access to a host of scopes and methods.

Create Schedules

Use the helper method to start building your schedules fluently.

Update Schedules

If your object already has a schedule attached, then when you make changes, and save, the changes will be made to the existing schedule.

Available Fields
Dynamic setting/getting

This factory uses dynamic methods, so be aware, for example, calling schedule($object)->hour() will return the current hour stored on the schedule factory, however, calling schedule($object)->hour(10) will set the hour property to 10 and return the factory for you to keep chaining.

Starts At/Expires At

You can set when a schedule should start and end, this is optional. The active/expired scopes will take notice of these fields.

Shortcuts

loadFromSchedule($schedule = null) - this will load all the attributes from the supplied schedule into the factory. It will also set the factory's schedule object to the schedule supplied. If no schedule is supplied then it will use the currently attached schedule i.e.

resetSchedule() - will reset all the properties to their default regardless of the object(s) attached to the factory.

refresh() - will return a new instance of the factory with the current object inside it.

loadFromCron($string) - will set the properties from a cron expression to the factory. You can use pseudo expressions:

Getting dates

You can get the next() date, previous() date, nextRunDates($n), previousRunDates($nth) (where $n is the number of dates you need i.e. 3). You can also get the potential run dates between two dates as well with runDatesBetween(Carbon $from, Carbon $to, bool $active = true).

Running schedules

When a schedule has run it is a good idea to run the hasRun() method, because this will update the last_run_at and next_runs_at timestamps.

Scopes

There a huge number of scopes available to you:

Disclaimer

Although a lot of time and effort has gone into making the between scopes and methods, it does have its limitations, as the dates are calculated on the fly, so be careful when using them, as they could cause a memory failure in your script.

Other Methods


All versions of schedulable with dependencies

PHP Build Version
Package Version
Requires nesbot/carbon Version ^1.21
mtdowling/cron-expression Version ^1.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 sinclairt/schedulable contains the following files

Loading the files please wait ....