Download the PHP package moox/jobs without Composer

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

Moox Jobs

Moox Jobs

Managing Job Queues, Failed Jobs and Batches in Filament.

Alternative to Laravel Horizon, if you use the database driver for queues. Nice addon to Laravel Horizon, if you use Redis. See Jobs for Beginners Guide.

Requirements

Moos Jobs requires

in short

Upgrading from Moox Jobs V2

Moox Jobs V3 requires changes to the database schema. We made an convenient update command for you:

The update command takes care about changing and creating the new fields without loosing data. Alternatively you may delete the job-manager table and simply run the following install command.

Quick installation

These two commmands are all you need to install the package:

Curious what the install command does? See manual installation below.

Features

Jobs

Monitor your running and finished jobs.

screenshot-jobs

Jobs waiting

See all waiting Jobs queued, delete one, many or even all waiting jobs at once before they hit the queue. And, yes we do not only have dark mode.

screenshot-waiting

Jobs failed

See all failed Jobs including details, retry or delete single jobs, many jobs or even all failed jobs at once.

screenshot-details

screenshot-detail

Job batches

Monitor your job batches, prune batches.

screenshot-batches

Manual Installation

This Laravel package is made for FilamentPHP and the awesome TALL-Stack. If you don't want to use our install command, follow thes manual steps to install the package.

Install the package via Composer:

Create the necessary tables:

Publish the config file with:

This is the content of the published config file:

Register the Plugins in app/Providers/Filament/AdminPanelProvider.php:

Instead of publishing and modifying the config-file, you can also do all settings in AdminPanelProvider like so:

You don't need to register all Resources. If you don't use Job Batches, you can hide this feature by not registering it.

Jobs for Beginners

Job queues are very useful. Every task that needs more than a couple of seconds can be handled in the background and Moox Jobs gives you full control in your applications UI. But starting with Laravel Job Queues needs some preparation.

The first decision depends on your hosting and deployment:

Laravel Forge

Laravel Forge supports Redis, Horizon and Supervisor. The best way is to install Horizon and to enable it in the Forge UI. You can then schedule any job (or command dispatching your job). Do schedule any command without the need to change code (in kernel.php), you might consider using the Filament Database Schedule plugin.

More information:

Shared Hosting

On most Shared Hosting and Managed Servers Redis and Supervisor are not available. You need SSH access or a CRON to start the queue worker like this:

The best way, to automate your jobs (and care for re-running the queue:worker after failure), is to create a crontab to run the Laravel Scheduler minutely and to use the Filament Database Schedule plugin to run your jobs (or commands).

More information:

Root Server

Laravel Forge supports Redis, Horizon and Supervisor. The best way is to install Horizon and to enable it in the Forge UI. You can then schedule any job (or command dispatching your job). To schedule any command without the need to change code (in kernel.php), you might consider using the Filament Database Schedule plugin.

More information:

Shared Hosting

On most Shared Hosting and Managed Servers Redis and Supervisor are not available. You need SSH access or a CRON to start the queue worker like this:

and the Laravel Scheduler like this:

The best way, to automate your jobs (and care for re-running the queue:worker after failure), is to create a crontab to run the Laravel Scheduler minutely and to use the Filament Database Schedule plugin to run your jobs (or commands).

More information:

Root Server

On a Root Server, VPS or Cloud Server Droplet the fastest way is to do job queuing like shared hosting. But as the combination Redis with Supervisor is much more stable and minimum twice as fast, you may also consider installing Redis and Supervisor manually using root privileges or (depending on your provider and deployment, maybe Forge, Envoyer or Ploi.io) a more convenient UI.

More information:

Laravel Vapor

On Laravel Vapor, the first-party deployment tool for going Serverless (using Amazon AWS Lambda Services), Laravel will automatically use Amazon SQS (Simple Queue Services) as queue driver. Laravel SQS is partly supported by Moox Jobs, means you can monitor jobs and failed jobs, retry failed jobs and use the progress feature. Pending jobs and batches are currently not implemented.

More information:

When you got your job queues up and running, a good way to test Moox Jobs is using our

Demo Job

You do not need to change anything in your Jobs to work with Filament Job Monitor. But especially for long running jobs you may find this example interesting:

Create a file named DemoJob.php in app/Jobs/ and copy over the contents above.

Customize Job Name

By default, the name of the tasks comes from the name of the class. This can be rewritten based on the following example.

Demo Job Command

This example command will start the job:

Create a file DemoJobCommand.php in app/Console/Commands. Then do a

to dispatch one Demo Job.

Now you can monitor the progress of your job in the Filament UI.

Progress

As shown in the Demo Job above, Moox Jobs comes with a progress feature. Using the JobProgress trait in your jobs is an optional thing. Jobs without the JobProgress-trait run and show up in the Moox Jobs UI, just missing the comfort of having the progress shown.

If you want to use the progress feature, be reminded that:

Model

The database model for Moox Jobs is designed with Vemto:

jobs-model

Authorization

We use Filament Shield instead, so that code is not heavily tested. Please leave a feedback, if you struggle.

If you would like to prevent certain users from accessing your page, you can register a policy:

same for FailedJobPolicy and JobBatchPolicy.

This will prevent the navigation item(s) from being registered.

Scaling

While Laravels queue system and Laravel Horizon are made for spawning (specially batches) across multiple servers, Moox Jobs is not fully prepared for this kind of usage. The core strength of Moox Jobs is the Filament integration and the possibility to manage Jobs running on a non-Redis driver, not managing enterprise server farms.

Besides this, Moox Jobs is tested managing thousands of jobs per hour or millions of jobs per month.

screenshot-batches

Limitations

Moox Jobs is the perfect fit for the database queue driver. It runs fine on shared hostings and provides a job monitor, pending jobs, failed jobs and the possibility to retry failed jobs, where other Laravel packages like Horizon do not fit.

The job monitor and failed jobs are also working with Redis, SQS and Beanstalkd, but it does not show waiting jobs and job batches. For Redis we recommend using Laravel Horizon, for Amazon SQS the AWS Dashboard. The solutions for Beanstalkd seem outdated, but you might give Laravel Beanstalkd Admin UI a try.

Another thing is using the Sync driver. As the Sync driver in Laravel is intended for development and testing, it executes jobs immediately (synchronously) and does not utilize queues. Therefore, it doesn't use the failed_jobs, jobs, or job_batches tables. Jobs are executed immediately within the same request lifecycle, so there's no queuing or storing of jobs. If a job fails, it's handled immediately within the execution context, not logged in the failed_jobs table. Jobs running with the sync driver may appear as running jobs and stay running forever, even if they are already completed or failed.

We plan to extend support for all queue drivers in the future. Watch the changelog.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Roadmap

As there are many parts (plugins) of Moox that need to be developed, there is no ETA on the following ... let's call them ideas.

3.0.1 Preparation

3.0.2 Stability

The planned next release focuses on stability:

The planned V3.1 release will contain major UX improvements and a new dashboard:

3.2 Notifications

3.3 Queue Worker and Supervisor

3.4 SQS

3.5 Beanstalkd

Contribute

We welcome every contribution! It would be awesome, if you:

Testing

Moox Jobs has currently no fully automated tests (besides Laravel Pint, PHPStan and Codacy as Quality Gates), but we are on the way to automate testing. We need two kind of tests:

1) The install and update commands 2) The installed application itself

and there are some things to consider:

Test installation

This installation runs for a few hours on Forge, Vapor, Shared Hosting, Mac and Windows:

Test the update

Test installation with Filament install

Test installation with Filament require

Cleanup after testing

Sponsors

The initial development of Moox was sponsored by heco gmbh, Germany. A huge thank you for investing in Open Source!

If you use this plugin, please consider a small donation to keep this project under maintenance. Especially if it is a commercial project, it is pretty easy to calculate. A few bucks for a developer to build a great product or a hungry developer that produces bugs or - the worst case - needs to abandon the project. Yes, we are happy about every little sunshine in our wallet ;-)

License

The MIT License (MIT). Please see License File for more information.

Credits

This Filament Plugin is heavily inspired (uses concept and / or code) from:

Both under MIT License. A BIG thank you!!! to the authors.


All versions of jobs with dependencies

PHP Build Version
Package Version
Requires moox/core 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 moox/jobs contains the following files

Loading the files please wait ....