NAME

Taskwarrior::Kusarigama::Plugin::Renew - create a follow-up task upon completion

VERSION

version 0.12.0

SYNOPSIS

$ task add water the plants rdue:now+5d rwait:now+4d

DESCRIPTION

The native recurring tasks in Taskwarrior create new tasks after a given lapse of time, no matter if the already-existing task was completed or not.

This type of recurrence will create a new instance of the task upon the completion of the previous one. This is useful for tasks where having hard-set periods don't make sense (think 'watering the plants').

Note that no susbequent task is created if a task is deleted instead of completed.

The plugin creates 4 new UDAs. renew, a boolean indicating that the task should be renewing, and rdue, rwait and rscheduled, the formula for the values to use upon creation/renewal.

renew is optional and only required if none of the r* attributes is present.

Since the waiting period is often dependent on the due value, as a convenience if the string due is found in rwait or rscheduled, it will be substitued by the rdue value. So

$ task add rdue:now+1week rwait:-3days+due Do Laundry

# equivalent to

$ task add rdue:now+1week rwait:now+1week-3days Do Laundry

Why -3days+due and not due-3days? Because it seems that task does some weeeeeird parsing with due.

$ task add project:due-b Do Laundry
Cannot subtract strings

(see https://bug.tasktools.org/browse/TW-1900)

Date calculations

This plugin adds a trinary operator to all of the r* attributes.

task add do the thing rdue:"eom - now < 1w ? eom+1m : eom"

In this example, we want to do the thing at least once a month, but if we do it in the last week of the month, we're satisfied and set the new deadline at the end of next month.

AUTHOR

Yanick Champoux <yanick@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019, 2018, 2017 by Yanick Champoux.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.