Download the PHP package a-bashtannik/fasti without Composer

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

Build Status Total Downloads Latest Stable Version License

Fasti is a Laravel package that enables developers to precisely schedule task execution in the future. With Fasti, you can defer the launch of any Job for any period, specifying the time and date to the minute. At the designated time, Fasti retrieves the required Job from the repository and either executes it synchronously or dispatches it to a queue.

Unlike Laravel's powerful recurring task scheduler, Fasti focuses on scheduling individual tasks for specific times. It's user-friendly, allowing you to easily create, list, or cancel tasks on demand.

Installation

[!NOTE] This package requires PHP 8.2+ and Laravel 11+

Publish migration table:

⚠️ Add the tick command to your console.php file:

Usage

Schedule your jobs using well-known Laravel patterns and interfaces.

Jobs are eligible for scheduling with Fasti if they implement a handle() method. At the scheduled time, Fasti executes your job synchronously within the cron job process thread, alongside any other cron jobs you've defined. To leverage Laravel's queuing system, simply implement the ShouldQueue interface on your job class. This allows Fasti to dispatch the job to Laravel's queue using the standard Bus facade behind the scenes.

This job will be executed synchronously at the specified time:

Fasti supports encrypted jobs if class implements ShouldEncrypt interface.

Use tiny Eloquent model to store scheduled tasks

Fasti includes a lightweight Eloquent model that stores essential job information: ID, payload, and dates. While Fasti provides a service for convenient job management, you're not limited to it. In your controllers, you have the flexibility to interact directly with the Eloquent model using standard queries if you need more fine-grained control or custom operations.

Testing

Test your scheduled jobs with ease using Fasti's Fasti::fake() method and built-in assertions.

Fasti operates as a scheduling layer for your Laravel jobs, focusing solely on when to initiate them. It's important to note that Fasti doesn't manage job execution, queues, releases, attempts, or failures.

Instead, when the scheduled time arrives, Fasti simply hands off the job to Laravel's default Bus.

It means you are free to use well-known Bus assertion methods shipped with Laravel when the job is dispatched to the queue.

Using custom models or storage to manage scheduled jobs

For simple applications, Fasti's built-in Eloquent model is sufficient. However, if you need to store scheduled jobs in a custom database table or use a different storage mechanism, Fasti provides a way to do so.

Define your own model implementing the Bashtannik\Fasti\Contracts\SchedulableJob interface.

It's important to note that while your model is required to implement this interface, it doesn't overload it with new properties or methods. This approach allows Eloquent to operate normally. You are simply required to provide a standard set of fields in the model or data transfer object to ensure Fasti works smoothly and your IDE's type checking is happy.

Create your own repository that implements the FastiScheduledJobsRepository interface and bind it in your app service provider register() method.

Hint: store human-friendly job type name

When using FastiEloquentRepository repository, by default it stores class name in the type field. However, you can define your own set of human-friendly names in your AppServiceProvider like you do with morph-many relationships.

This field doesn't affect the job execution but can be useful for debugging or logging purposes.

Hint: monitor your scheduled jobs using artisan fasti:list command

Simulate time in your manual tests and check if the job is executed


All versions of fasti with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 a-bashtannik/fasti contains the following files

Loading the files please wait ....