Send notification and reminder emails for tasks stored as struct data
Compatible with DokuWiki
External requirements: This plugin requires the following additional components that must be installed separately:
Download and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
This plugin provides a task-tracking system for your wiki by leveraging the Struct plugin. A user configures this plugin to look at a particular schema, which must contain some specific fields. Each page assigend to that schema then represents a tasks. Whenever a task page is saved, the plugin will check for changes to the struct data and email users accordingly. The plugin also provides a CLI script which, if set up as a cronjob, can send reminders of tasks which are coming due.
This plugin can work with a schema of your choice, set using the configuration manager. However, the plugin will report an error if the schema does not have the following fields:
You are free to set any other properties of these fields (e.g., label text, hint, etc.) as you see fit. You may also define any other fields in this schema that you like; they will have no effect on the operation of this plugin.
If you would like to have reminders sent for open tasks which are coming due soon or are overdue, you need to run this plugin's CLI script. This is best done by setting a cronjob to run it once per day. You should configure it to run something like the following command: /usr/bin/php $DOKUWIKI_ROOT/bin/plugin.php structtasks -v &> $DOKUWIKI_ROOT/structtasks-cron.log
. Here, $DOKUWIKI_ROOT
refers to the directory in which DokuWiki was installed. The -v
option produces verbose output, which can be useful for debugging purposes. You will likely want to schedule this to run in the early morning.
Cronjobs are configured using your crontab file. If you are using shared-hosting for your DokuWiki instance, your hosting provider should provide some means to set up cronjobs, using a tool such as cPanel.
As this script is not run as part of a HTTP request, DokuWiki can not autodetect the baseurl or basedir. In order to generate valid page links in the reminder email, you must set these explicitly in your wiki configurations.
Cronjobs run using the time-zone configured for your server, not that of the DokuWiki instance. If you are on a shared host, it may not be obvious what this is. You can find it using these instructions. Simply adjust the time set for your cronjob accordingly, so it runs at the desired time in your time-zone. As different jurisdictions enter Daylight Savings Time on different dates (if at all), it is recommended to run the cronjob more than an hour after midnight. This should ensure that it will always be run on the expected day.
When struct data is changed for a page assigned the appropriate schema, the plugin will send emails to those assigned to the task, that are not the editor, in the following circumstances:
Running the CLI script for this plugin (e.g., with a command like /usr/bin/php $DOKUWIKI_ROOT/bin/plugin.php structtasks -v
) will send users assigned to a task the following types of notifications, depending on the plugin configurations:
reminder
configuration) which are not marked as closedreminder
is set to send notifications for tasks due in 0 days), if the task is not already closedoverdue_reminder
setting is set to true)Please report bugs and issues at http://github.com/cmacmackin/dokuwiki-plugin-structtasks/issues
There exist a number of other plugins for handling tasks. However, the approach I took with this plugin provided two unique features I particularly wanted:
The latter point is very important. The plugin places no upper limit on the number and type of fields contained in your struct schema, so you can associate arbitrary additional metadata with your tasks, indicating things like category, priority, etc. You can then filter and sort your tasks in an aggregation however you like.