I tried Tasks Plugin, but I can’t find a way to add recurring tasks into daily note. Can someone help or provide some suggestion?
What I want
I manage the recurring tasks in a specied folder, when i create daliy note with template, I hope the recurring tasks(weekly or monthly) can be add into the daily note.
Are you using the tasks plugin for task management? It has very nice recurrence options.
If not, you could look into a dataview query. Looking at the frontmatter in your image, I don’t know that its got enough detail to pull it out on a specific day, but, to just get a list of those, something like this might get you started
list from "recurring tasks"
And then, once you have your date information sorted out, some kind of where clause to filter it down to the specifics you’re looking for.
Thanks for your reply. I didn’t use Tasks plugin before. I am now trying to.
There are 3 ways I am working:
Tasks Plugin: Practice more and get more understanding of its features about recurrence options.
Tasks + Dataview: Try to consolidate this two plugins to manage recurring tasks and make it show in my daily notes.
Templater Plugin: Study some Javascript, and add my user script with Templater Plugin, to make it happen that when I create daily note with template, my user script can automtically get the correct recurring tasks and add into daily note.
For 3, I have finished part of my user script, it can automatically get recurring tasks and add into daily note when creating, but without date and period conditions. I am now looking for the suitable Obsidian API to get the fronmatter of the md file, and calculate the correct date(start date, end date, period)
My user script as below
const files = this.app.vault.getMarkdownFiles();
async function main() {
let recurringTask = "";
for (let i = 0; i < files.length; i++) {
if (files[i].name.includes("🔁")) {
recurringTask = recurringTask + "- [ ] [[" +files[i].name +"]]\n";
}
}
return recurringTask;
}
module.exports = main;