Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nightly Task Bundle Laravel Package

dekalee/nightly-task-bundle

View on GitHub
Deep Wiki
Context7

Dekalee/NightlyTaskBundle

Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

This bundle will launch all the configured nightly task.

Installation

Use composer to install the bundle

    $ composer require dekalee/nightly-task-bundle

If you are not using symfony4 you should activate the bundle in your AppKernel.php file.

    new Dekalee\NightlyTaskBundle\DekaleeNightlyTaskBundle(),

Usage

List commands

To list all the commands register as nightly task command run

    $ ./bin/console dekalee:nightly:list

Launch commands

To launch the nigthly tasks, run the command :

    $ ./bin/console dekalee:nightly:tasks

Define a command as nightly tasks

With an interface

To define a command as a nigthly task, it should implement the Dekalee\NightlyTaskBundle\Command\NightlyCommandInterface interface.

This interface will expose two methods:

  • getPriority will define the order in which the command should be run. Higher priority wins.
  • isEssential will determine if the nighty task command should fail if this particular command fails.

With a tag

It is also possible to transform a command in a nightly task by tagging the service directly.

   tags:
       - { name: console.command }
       - { name: dekalee_nightly.task.strategy, priority: 100 }

Your service should be defined as a command and then defined as a nightly task with a priority.

It is not possible to make those kind of command essential.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky