Added automatic actions based on a daily event

This commit is contained in:
Frederic Guillot
2016-01-27 21:45:37 -05:00
parent 320c7971f6
commit 32e4a932c8
25 changed files with 421 additions and 30 deletions

View File

@@ -4,7 +4,7 @@ Command Line Interface
Kanboard provides a simple command line interface that can be used from any Unix terminal.
This tool can be used only on the local machine.
This feature is useful to run commands outside the web server process by example running a huge report.
This feature is useful to run commands outside of the web server processes.
Usage
-----
@@ -28,6 +28,7 @@ Options:
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
cronjob Execute daily cronjob
help Displays help for a command
list Lists commands
export
@@ -42,6 +43,8 @@ Available commands:
notification:overdue-tasks Send notifications for overdue tasks
projects
projects:daily-stats Calculate daily statistics for all projects
trigger
trigger:tasks Trigger scheduler event for all tasks
```
Available commands
@@ -116,7 +119,7 @@ Emails will be sent to all users with notifications enabled.
You can also display the overdue tasks with the flag `--show`:
```bash
$ ./kanboard notification:overdue-tasks --show
./kanboard notification:overdue-tasks --show
+-----+---------+------------+------------+--------------+----------+
| Id | Title | Due date | Project Id | Project name | Assignee |
+-----+---------+------------+------------+--------------+----------+
@@ -125,20 +128,22 @@ $ ./kanboard notification:overdue-tasks --show
+-----+---------+------------+------------+--------------+----------+
```
Cronjob example:
```bash
# Everyday at 8am we check for due tasks
0 8 * * * cd /path/to/kanboard && ./kanboard notification:overdue-tasks >/dev/null 2>&1
```
### Run daily project stats calculation
You can add a background task to calculate the project statistics every day:
This command calculate the statistics of each project:
```bash
$ ./kanboard projects:daily-stats
./kanboard projects:daily-stats
Run calculation for Project #0
Run calculation for Project #1
Run calculation for Project #10
```
### Trigger for tasks
This command send a "daily cronjob event" to all open tasks of each project.
```bash
./kanboard trigger:tasks
Trigger task event: project_id=2, nb_tasks=1
```