Skeleton for a plugin that adds a new custom "batch"-command to the CLI-interface
This is not meant to be a (really) productive plugin, but rather the starting point if you want to develop a plugin that adds a new custom "batch"-command to the CLI-interface of Kanboard. An example for a "batch"-command is the built-in cronjob-CLI-command.
This example shows you how to run core-CLI-commands along with custom CLI-commands all triggered from one new "batch"-command.
In order for the DEMO to work, you also have to install the following 2 plugins:
- https://github.com/manne65-hd/Kanboard-Cron_SingleCustomCommand
- https://github.com/manne65-hd/Kanboard-Cron_ManyCustomCommands
I made this, while trying to figure out how to make a plugin that can act as a CRON-command and thought I'd share it here, so that others can also use and (if necessary) improve this skeleton.
Yes ... this is in fact a fully functioning plugin in order to demonstrate the basic concept.
Whenever being called via php cli my-cronjob
it will trigger the following CLI-commands:
- Kanboard core CLI-commands
- notification:overdue-tasks
- trigger:tasks
- Custom CLI-commands (included in my other 2 Cron-Skeleton-Plugins)
- my-single-custom-command
- manycommands:my-second-custom-command
- manycommands:my-third-custom-command
- Manfred Hoffmann
- License MIT
- Kanboard >= 1.0.35
You have the choice between 2 methods:
- Download the zip file and decompress everything under the directory
plugins/Cron_TriggerMultipleCommands
- Clone this repository into the folder
plugins/Cron_TriggerMultipleCommands
Note: Plugin folder is case-sensitive.