Skip to main content

Automatic scheduler for taskwarrior

Project description

A non-AI automatic scheduler for taskwarrior (i.e. alternative to skedpal/timehero/flowsavvy/reclaim/trevor/motion)

This is a taskwarrior extension checks if tasks can be completed on time, considering estimated time and working hours.

Features

  • Use arbitrarily complex time maps
  • Use ical to block time from scheduling (e.g. for meetings, vacations, etc.)
  • Implement scheduling algorithm for parallely working on multiple tasks
  • Use Google/Microsoft/Apple API to access calendars

Install

pipx install taskcheck

How does it work

This extension parses your pending and waiting tasks sorted decreasingly by urgency and tries to schedule them in the future. It considers their estimated time to schedule all tasks one by one (parallel scheduling may be supported in future).

You will need to add the estimated and time_map UDAs to your tasks. The estimated attribute is the expected time to complete the task in hours. The time_map is a comma-separated list of values that indicates the hours per day in which you will work on a task.

It will modify the taskwarrior tasks by adding the completion_date attribute with the expected date of completion and the scheduled attribute with the date when the task is expected to start.

It will print a red line for every task whose completion_date is after its due_date.

You can exclude a task from being scheduled by removing the time_map or estimated attributes.

You can see tasks that you can execute now with the task ready report.

Configuration

  1. Create a TOML file at ~/.config/task/taskcheck.toml with the following format:
[time_maps]
# in which hours you will work in each day
[time_maps.work]
monday = [[9, 12.30], [14, 17]]
tuesday = [[9, 12.30], [14, 17]]
wednesday = [[9, 12.30], [14, 17]]
thursday = [[9, 12.30], [14, 17]]
friday = [[9, 12.30], [14, 17]]

[time_maps.weekend]
saturday = [[9, 12.30], ]
sunday = [[9, 12.30], ]

[scheduler]
days_ahead = 1000 # how far go with the schedule (lower values make the computation faster)

[calendars]
# ical calendars can be used to block your time and make the scheduling more precise
[calendars.1]
url = "https://your/url/to/calendar.ics"
expiration = 0.08 # in hours (0.08 hours =~ 5 minutes)
timezone = "Europe/Rome" # if set, force timezone for this calendar; timezone values are TZ identifiers (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

[calendars.holidays]
url = "https://www.officeholidays.com/ics-clean/italy/milan"
event_all_day_is_blocking = true
expiration = 720 # in hours (720 hours = 30 days)
  1. Add the taskwarrior config
# taskcheck UDAs
uda.time_map.type = string
uda.time_map.label = Time Map
uda.time_map.default = work # suggested
uda.estimated.type = duration
uda.estimated.label = Estimated Time
uda.completion_date.type = date
uda.completion_date.label = Expected Completion Date

# Adjust urgency for taskcheck
# you will use `wait:` to avoid scheduling tasks too much sooner
urgency.waiting.coefficient = 0.0
# you will use `active:` to prioritize tasks already started even if the estimated amount is decreased
urgency.active.coefficient = 3.0 
urgency.scheduled.coefficient = 0.0 # tasks that are not scheduled may still be urgent

# we need to be able to modify recurrent tasks without prompt
recurrence.confirmation=no

# suggested
urgency.inherit=1 # use dependencies to automatically prioritize tasks
urgency.blocking.coefficient=2

# give urgeny values to the estimated time
# this is ln(estimation)
urgency.uda.estimated.PT1H.coefficient = 1
urgency.uda.estimated.PT2H.coefficient = 2.32
urgency.uda.estimated.PT3H.coefficient = 3.67
urgency.uda.estimated.PT4H.coefficient = 4.64
urgency.uda.estimated.PT5H.coefficient = 5.39
urgency.uda.estimated.PT6H.coefficient = 6.02
urgency.uda.estimated.PT7H.coefficient = 6.56
urgency.uda.estimated.PT8H.coefficient = 7.03
urgency.uda.estimated.PT9H.coefficient = 7.45
urgency.uda.estimated.PT10H.coefficient = 7.82
urgency.uda.estimated.PT11H.coefficient = 8.16
urgency.uda.estimated.PT12H.coefficient = 8.47
urgency.uda.estimated.PT13H.coefficient = 8.75
urgency.uda.estimated.PT14H.coefficient = 9.01
urgency.uda.estimated.PT15H.coefficient = 9.25
urgency.uda.estimated.PT16H.coefficient = 9.47
urgency.uda.estimated.PT17H.coefficient = 9.68
urgency.uda.estimated.PT18H.coefficient = 9.87
urgency.uda.estimated.PT19H.coefficient = 10.05
urgency.uda.estimated.PT20H.coefficient = 10.22
urgency.uda.estimated.PT21H.coefficient = 10.38
urgency.uda.estimated.PT22H.coefficient = 10.53
urgency.uda.estimated.PT23H.coefficient = 10.67
urgency.uda.estimated.PT24H.coefficient = 10.80
urgency.uda.estimated.PT25H.coefficient = 10.93
urgency.uda.estimated.PT26H.coefficient = 11.05
urgency.uda.estimated.PT27H.coefficient = 11.16
urgency.uda.estimated.PT28H.coefficient = 11.27
urgency.uda.estimated.PT29H.coefficient = 11.37
urgency.uda.estimated.PT30H.coefficient = 11.47
urgency.uda.estimated.PT31H.coefficient = 11.56
urgency.uda.estimated.PT32H.coefficient = 11.65
urgency.uda.estimated.PT33H.coefficient = 11.73
urgency.uda.estimated.PT34H.coefficient = 11.81
urgency.uda.estimated.PT35H.coefficient = 11.89
urgency.uda.estimated.PT36H.coefficient = 11.96
# maximum duration is 36 hours

CLI Options


-v, --verbose: increase output verbosity
-t, --today: how much time has been already used today (default: 0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taskcheck-0.1.2.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taskcheck-0.1.2-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file taskcheck-0.1.2.tar.gz.

File metadata

  • Download URL: taskcheck-0.1.2.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.30

File hashes

Hashes for taskcheck-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a105fa97b8b702caa21bfd91dd31a140a4c9817a2027bce0dbefe9b0b44bc703
MD5 3330801966ab4968e61be9217ec84947
BLAKE2b-256 5c92479c921b2f55ac02ee5bd3259d39c9d532f6c414e1fcb6bebaf224a5ff51

See more details on using hashes here.

File details

Details for the file taskcheck-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: taskcheck-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.30

File hashes

Hashes for taskcheck-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a60dcb4d0d64e0d35cc22589dd5eefee030f906458613cc739c40794992795c
MD5 623037b7dff28f57a0ff2bbb6e11bec9
BLAKE2b-256 8bac416ea74987a4faec6cb7568e9b2b1104962baf132b741d57dfea7c3d1b75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page