Tasks makes it possible to write SQL-like queries against your checklists across all notes.
Quick Reference
Notes
- Current global tasks filter is
#Tasks. This means the plugin only queries checklist items containing that tag. This can be changed or disabled in the plugin’s configuration.
Dates
- Toggling a task done in preview mode or using Cmd-Enter will cause Tasks to append the completed date onto the task
- Adding
📅 <YYYY-MM-DD>to a note sets a due date on the note. You can add this manually, or it will be automatically added if you use the “Tasks: Create or edit” command from the command palette. - Make a task a recurring task with
🔁 every <recurrence>. This can also be added manually or via the command. Command is recommended since there is no validation in the editor.- Note: For best compatibility, a recurring task should have a due date and the recurrence rule should appear before the due date of a task.
Querying
Examples
All open tasks that are due today:
```tasks
not done
due today
```
All open tasks that are due within the next two weeks, but are not overdue (due today or later):
```tasks
not done
due after yesterday
due before in two weeks
```
All done tasks that are anywhere in the vault under a tasks heading (e.g. ## Tasks):
```tasks
done
heading includes tasks
```
Show all tasks that aren’t done, are due on the 9th of April 2021, and where the path includes GitHub:
```tasks
not done
due on 2021-04-09
path includes GitHub
````
Show all open tasks that are due within two weeks and hide the due date and edit button:
```tasks
not done
due after 2021-04-30
due before 2021-05-15
hide due date
hide edit button
```
Show all tasks that were done before the 1st of December 2020:
```tasks
done before 2020-12-01
```
Show one task that is due on the 5th of May and includes #prio1 in its description:
```tasks
not done
due on 2021-05-05
description includes #prio1
limit to 1 tasks
````
Filters
donenot donedone (before|after|on) <date>no due datedue (before|after|on) <date>is recurringis not recurringpath (includes|does not include) <path>description (includes|does not include) <string>- Matches case-insensitive (disregards capitalization).
heading (includes|does not include) <string>- Whether or not the heading preceding the task includes the given string.
- Always tries to match the closest heading above the task, regardless of heading level.
- Will never match a task that does not have a preceding heading in its file.
- Matches case-insensitive (disregards capitalization).
exclude sub-items- When this is set, the result list will only include tasks that are not indented in their file. It will only show tasks that are top level list items in their list.
limit to <number> tasks- Only lists the first
<number>tasks of the result. - Shorthand is
limit <number>.
- Only lists the first