Recurring tasks with taskwarrior

  about 473 words   2 min

taskwarrior

Reccuring tasks are boring. The same kind of things that we must achieve again and again on a daily, weekly or monthly basis is something that I want to take care painlessly.

I use taskwarrior for my todo list because it's a CLI app and since I past most of my time in terminals it was a natural choice.

What's handy is that I've got everything in a git repo that is synchronized between my work and home laptops.

I spent quite a lot of time online trying to find answers about how some new features where working or to see if some will be added soon. What I found out is that it looks like a lot of people using taskwarrior have issues about recurring tasks and don't really understand how it works. It's not really difficult once you get how the app is handling these tasks.

Here is how I use it on my side to add these kind of tasks.

Adding a recurring task

If you need to add a daily task, you could use this command :


  % task add "a daily recurring task" recur:daily due:eod   

The important parameter is the due:eod meaning that it must be done today. Once you mark it done it won't appears until the next day.

I've seen people adding a due day like eom but that's actually addind a task that has to be done until the end of the month. The next day you will have a new task and you will have until the end of the next month to finish it.

So the right way to add a daily / weekly / monthly is :

  
  # daily
  % task add "a daily recurring task" recur:daily due:eod

  # weekly
  % task add "a weekly recurring task" recur:weekly due:eow

  # monthly
  % task add "a monthly recurring task" recur:monthly due:eom

You can add of course some aliases to add these kind of tasks. Mine are


   alias trd="task add recur:daily due:eod"
   alias trw="task add recur:weexly due:eow"
   alias trm="task add recur:monthly due:eom"

Deleting a recurring task

When a reccurent task is created, children ones are spawned in the background that will pop up every time its needed. So to delete a task and all the children you need basically to remove the parent task.

You can display all parent tasks with the parameter +PARENT. For example :


  % task all +PARENT 
  ID St UUID     Age Done Project R Due        Description                
  45 R  c85cd2a9 25s              R 2020-03-22 test                       

Now you can delete it with :


  % task delete 45  
  Delete task 45 'test'? (yes/no) yes
  Deleting task c85cd2a9 'test'.
  This is a recurring task.  Do you want to delete all pending recurrences of this same task? (yes/no) yes
  Deleting recurring task 47be2278 'test'.
  Deleted 2 tasks.

Now the recurring tasks shouldn't show up any longer.


taskwarrior cli todo cli terminal
STORIES BASED ON SAME TAGS

Openshift Cheat Sheet

I find myself losing time always looking for some Openshift commands that I stumbled upon once in the documentation. This page is just a reminder of these commands : List all cluster-admins of your cluster % oc get clusterrolebindings -o json | jq '.items[] | select(.metadata.name=="cluster-admins") | .userNames' Add the admin role to some user of an project % oc adm policy add-role-to-user admin userX -n project-Y Binds a given role to specified users for all projects in the cluster.

Read more

Using Timewarrior With Taskwarrior

Terminals have always been a thing that I loved to use. I spend a lot of times using and tweaking them. i My daily use include a lot of this little programs that help you to improve your productivity. Keybindings and customizations is also one thing that I love about terminals compared to GUI. That's also why I awesomewm. For those who don't know what it is, it's a lightweight tiling window manager like Ion.

Read more

Vim, the only editor I use.

People around me know that I love to spend time in terminals. For them, I am probably a nerd that do a lot of obscure stuff in these little black windows. A lot of friends that look at my screen have the same reaction : Your computer doesn't work What the hell are you doing ? Can't you just have a normal laptop Since I'm using awesome as a window manager it keeps them even more dubious about how I'm using a computer.

Read more