PHPackages                             springbot/magento2-queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. springbot/magento2-queue

ActiveMagento2-module[Queues &amp; Workers](/categories/queues)

springbot/magento2-queue
========================

A generic job queuing package for Magento 2

1.2.2(6y ago)1862.8k↓69.5%8[1 issues](https://github.com/springbot/magento2-queue/issues)[2 PRs](https://github.com/springbot/magento2-queue/pulls)1OSL-3.0PHP

Since Mar 13Pushed 6y ago28 watchersCompare

[ Source](https://github.com/springbot/magento2-queue)[ Packagist](https://packagist.org/packages/springbot/magento2-queue)[ RSS](/packages/springbot-magento2-queue/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)DependenciesVersions (19)Used By (1)

[![GPL licensed](https://camo.githubusercontent.com/ca5873b401f316154406fb9e0d71d7866db3d79d908bfdb38be4c171711b2e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d626c75652e737667)](https://raw.githubusercontent.com/springbot/magento2-queue/master/LICENSE.md)

Magento2 Job Queue
------------------

[](#magento2-job-queue)

This module provides functionality to schedule and run jobs in a queue for Magento2. The basic idea is to allow developers to defer tasks that would otherwise delay the page load time and cause site slowness. Example use cases may be sending an email, communicating with a remote API, or running cleanup tasks in the background.

While originally written for our Springbot Magento2 integration, this module can be utilized for many other use cases.

The module provides both programmatic and command line ways to enqueue, run, and view jobs. The key components of a job are a fully qualified class name, a method name, and a list of arguments. There are a few requirements: the class must be autoloadable, the method must be public, and the params must not contain objects. Additional options are priority, queue name, and "run at" time.

### Installation

[](#installation)

Composer is the preferred method of installation:

```
composer require springbot/magento2-queue
php bin/magento module:enable Springbot_Queue
```

### Command line usage

[](#command-line-usage)

Enqueue a job

```
 php bin/magento springbot:queue:enqueue   [] [] [1] ... [N]
```

List current jobs in the queue

```
 php bin/magento springbot:queue:list
```

Process the queue

```
php bin/magento springbot:queue:process
```

### Programmatic usage

[](#programmatic-usage)

```
