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)

[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
urgency.uda.estimated.coefficient = 1.0   # Increase urgency for tasks with longer estimated durations
urgency.waiting.coefficient = 0.0 # you will use `wait:` to avoid scheduling tasks too much sooner

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

# suggested
urgency.inherit=1
urgency.blocking.coefficient=2

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

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.0.tar.gz (18.8 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.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for taskcheck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53718a9fe117c581007a622c9eab62582e54817727838de7670e67a7d0227699
MD5 6c3fe1766b53434bb20a78bcb61bc585
BLAKE2b-256 18bfd233b39241ce5d1f7945050ec880435feab84890e46a9d87687e1383a313

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for taskcheck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b27401e2641b25ee17e8c0c9b9bde9a348eef958ead3cb5a413bb4f58d0c0449
MD5 c85a0054db3d7688e5252884ce6f7dc8
BLAKE2b-256 871aeb9f0a0bac748734ee879801aa6b30663c7e532b8d54cdb41e84b748f122

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