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.post1.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.post1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taskcheck-0.1.0.post1.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.post1.tar.gz
Algorithm Hash digest
SHA256 68bd89d470e6cc7300a37cfef5867d445f229679bc6e1e0adbf7aca561f5326d
MD5 ca9813bc1141f0fbb36ba09424e62fce
BLAKE2b-256 8f700cd3042bfcf2b72ca4687c3d9360cff7d9c8ef6e7bcd24e084afe4e6d790

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskcheck-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 a116280a8e95c3bf51fbfad5b593d004cd127479b38d5f906d21e5a74a1a1f6d
MD5 b2414d40d823ac72e314824a401ac8eb
BLAKE2b-256 b0f1e009cfb8d7ac64bfa188ecb5be9314d913069ae9c018efb3d901677bc27a

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