NotePlan has a simple built-in repeat mechanism, which allows for @repeat(1/n). That wasn't flexible enough for my purposes, so I wrote this plugin to allow repeats every x days, weeks, months, quarters or years. It does the work of creating the next task using information from completed tasks that include a @repeat(interval), on the appropriate future date. Here's an example (from v0.5) where it will repeat 6 weeks after completion:
And here's an example where the repeat is calculated from a set date:
* [ ] put out recycling bin @repeat(2w)
is completed, and then /rpt run, the task then becomes:
* [ ] put out recycling bin @repeat(2w) >2021-07-15
* [x] put out recycling bin @repeat(2w) @done(2021-07-01)
and the task will show up again 2 weeks after the last set date.
Compared with the built-in functionality, it also allows you to easily change the text of a repeated task, which otherwise means visiting all the future notes with repeats.
For this feature to work, you need to have the 'Append Completion Date' setting turned on in Preferences > Todo, and not to mind the time portion of the @done(...) tag being removed, as a sign that the line has been processed.
From NotePlan v3.7.2, this plugin can automatically generate the new repeated task after you complete an existing one. This requires adding the following line to frontmatter at the start of every note you wish to automate in this way:
---
title: <<the note's title on this line, instead of a markdown H1 title>>
triggers: onEditorWillSave => jgclark.RepeatExtensions.onEditorWillSave
---Note: This uses the experimental new trigger feature, and the NotePlan developer is rightly being cautious with it. Hence ensuring you don't turn it on unintentionally.
On the currently open note, open the command bar and type the /generate repeats command.
- When run on a Project note, it creates the new repeated task straight before the completed task.
- When run on a (daily or weekly) Calendar note, it creates the new repeated task on the date of the new repeat.
The time intervals have two parts: number and then a character. The character is one of:
borB: business days (ignore weekends, but doesn't ignore public holidays, as they're different for each country.)dorD: daysworW: weeksmorM: monthsqorQ: quartersyorY: years
When the number starts with a + (e.g. +1m) it will duplicate the task for 1 month after the date the task was completed.
When the number doesn't start with a + (e.g. 1m) it will duplicate the task for 1 month after the date the task was last due. This is found from a >yyyy-mm-dd scheduled date. If this can't be determined, then it defaults to the first option.
If you find an issue with this plugin, or would like to suggest new features for it, please raise a Bug or Feature 'Issue'.
If you would like to support my late-night work extending NotePlan through writing these plugins, you can through
Thanks!
Please see the CHANGELOG.
