PHPackages                             magicalella/yii2-backgroundtask - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. magicalella/yii2-backgroundtask

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

magicalella/yii2-backgroundtask
===============================

Extension for managing the background task

v1.2.0(9mo ago)110MITPHPPHP &gt;=7.4.0

Since Jul 23Pushed 5mo agoCompare

[ Source](https://github.com/magicalella/yii2-backgroundtask)[ Packagist](https://packagist.org/packages/magicalella/yii2-backgroundtask)[ RSS](/packages/magicalella-yii2-backgroundtask/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Estensione per export in background dei dati in vista index grid
================================================================

[](#estensione-per-export-in-background-dei-dati-in-vista-index-grid)

Installazione
-------------

[](#installazione)

Il modo migliore per installare questa estensione è tramite [composer](http://getcomposer.org/download/).

Lancia

```
composer require --prefer-dist magicalella/yii2-backgroundtask "*"

```

o aggiungi

```
"magicalella/yii2-backgroundtask": "*"

```

nella sezione require del tuo file "composer.json".

**E avvia la migrazione dei file**

yii migrate/up --migrationPath=@vendor/magicalella/yii2-backgroundtask/migrations --interactive=0

Può essere creato manualmente. Vale a dire, la tabella `backgroundtask` campi:

id(primaryKey, AUTO\_INCREMENT); action(varchar(350)); id\_user(int(11)); progress(int(2)); params(text); output(text); log(text); stato(int(1));

Installazione
-------------

[](#installazione-1)

Nel file: `backend/config/main.php` e `console/config/main.php` se yii advanced se Yii basic `config/web.php` e `config/console.php`scrivi

```
    'components' => [
    ...
        'backgroundtask' => [
            'class'   => 'magicalella\backgroundtask\Module',
            'site_realpath' => '/var/www/vhosts/miosito.com',
            'site_root' => 'https://www.miosito.com'
        ],
    ...
    ]

```

I file esportati verranno esportati nella cartella @uploads/backgroundtask

Attivazione
-----------

[](#attivazione)

Creazione task Inserire in view Index:
--------------------------------------

[](#creazione--taskinserire-in-view-index)

Per creare il task utilizzare il Widget

magicalella\\backgroundtask\\widgets\\BackgroundTaskWidget;

```

```

in \_protected\\console\\controllers
------------------------------------

[](#in--_protectedconsolecontrollers)

Copia il file src/console/BackgroundtaskController.php

OVERRIDE VIEWS
--------------

[](#override-views)

Se vuoi fare l'override dell view puoi farlo impostando il percorso in cui metterai gli override nel file di \_protected/backend/config/main.php es:

```
    'components' => [
        ...
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@app/views' => '@webroot/themes/loyalty3.0/views',
                    '@vendor/magicalella/yii2-backgroundtask/views' => '@app/views',//file nella cartella _protected/backend/views
                ],
                'baseUrl' => '@web/themes/loyalty3.0',
            ],
        ],
        ...
    ]

```

IMPORTANTE:
-----------

[](#importante)

Il tuo server deve permettere il comando shell\_exec

MANUTENZIONE:
-------------

[](#manutenzione)

Aggiungi questa chiamata al tuo pannello Crontask per mantenere pulita la cartella Export che col tempo andrebbe a riempirsi Decidi tu la schedulazione in base alla quantità di file creati

php \_protected/yii backgroundtask-console/clean-export

Andrà ad eliminare i file con data di creazione più vecchia di 3 mesi

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance69

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Total

4

Last Release

50d ago

Major Versions

v1.2.0.x-dev → v2.0.0.x-dev2026-03-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8556d75138833ae5a306ebff1807edf3f501cb452e9cf533535b52f7855adf3?d=identicon)[magicalella](/maintainers/magicalella)

---

Top Contributors

[![magicalella](https://avatars.githubusercontent.com/u/29289928?v=4)](https://github.com/magicalella "magicalella (42 commits)")

---

Tags

exportyii2extensiontaskbckground

### Embed Badge

![Health badge](/badges/magicalella-yii2-backgroundtask/health.svg)

```
[![Health](https://phpackages.com/badges/magicalella-yii2-backgroundtask/health.svg)](https://phpackages.com/packages/magicalella-yii2-backgroundtask)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
