Time Budget: study minutes per day, not new cards per day

AnkiWeb addon 270735584

Sets a daily study-time budget and adjusts the deck's today-only new-card limit using FSRS forecasts so predicted new-card and review load stays within budget.
AI-generated summary; may contain mistakes.

schedulingfsrsprogress-trackingdeck-management

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-06-12
Anki versions
2.1.1~
Description language
en

Maintenance

active

  • Last update or commit was 111 days before the snapshot (2026-06-12).
  • The repository has 4 test files.
  • The repository has 2 GitHub Actions workflows.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-06-12
History across monthly snapshots

Loading…

Similar addons

Deck Progress Planner

Provides a two-phase system that plans new-card introduction deadlines with milestone tracking, then forecasts mature-card completion using 30-day review consistency and adjustable deadlines.

schedulingprogress-trackingdeck-management

Rating 1 πŸ‘ 1 Β· πŸ‘Ž 0 Anki 25.09~ Updated 2026-03-23

README

Time Budget Scheduler

An Anki add-on that replaces the fixed "new cards per day" setting with a daily study-time budget. You decide how many minutes per day you want to study; the add-on automatically computes how many new cards to introduce so your predicted study time stays within that budget.

Why

A fixed new-card count doesn't correspond to a fixed amount of time. Reviews accumulate, so 20 new cards a day might cost 10 minutes in the first week and 45 minutes a few months later. Most people budget their day in time, not in cards β€” "30 minutes a day" is a commitment you can actually keep. This add-on holds your study time constant instead: it introduces new cards quickly while the deck is light and slows down as the review load grows, and it won't introduce a card today if doing so would push a future day over your budget.

It only writes the deck's today-only new-card limit (the same field as "New cards today" in deck options). It doesn't reschedule reviews, modify cards, or change your presets.

How it works

Anki's FSRS scheduler tracks each card's memory state. This add-on uses that data to simulate your future review load and find the new-card introduction rate that keeps your daily study time at or below your budget β€” without ever overloading a future day.

The core algorithm is a greedy receding-horizon controller built on FSRS-6:

  1. For each new card, compute the expected "review tail" β€” how many seconds that card will consume on each future day as it matures from learning to mature.
  2. Simulate the baseline load from your existing cards over the planning horizon.
  3. On each day, introduce as many new cards as possible without pushing any current or future day over the budget (convolution-based greedy MPC).

This gives you a sustainable pace that uses every minute of your budget without burning yourself out.

Requirements

  • Anki 25.02 or newer (the add-on reads FSRS-6 parameters, which older versions don't store).
  • FSRS enabled for the decks you want to manage (Deck Options β†’ FSRS). Decks still on the older SM-2 scheduler are skipped with a warning.

Installation

From AnkiWeb (recommended)

Open Tools β†’ Add-ons β†’ Get Add-ons and paste the add-on code:

TODO-ANKIWEB-CODE

<!-- Replace TODO-ANKIWEB-CODE with the code AnkiWeb assigns after the first upload. -->

From release

Download the latest time_budget.ankiaddon from the releases page and double-click to install, or go to Tools β†’ Add-ons β†’ Install from file.

From source

git clone https://github.com/Vizia128/anki-time-per-day
cd anki-time-per-day
python build.py          # produces time_budget.ankiaddon

Then install the .ankiaddon file in Anki.

Usage

Open Tools β†’ Time Budget β†’ Open… to configure a deck.

Settings

Setting Description
Daily budget Minutes per day you want to spend studying (new + review).
Finish in Target days to finish all new cards. Edit either field; the other updates automatically via binary search.
Today's budget One-off override for today only; takes effect when you press Save. The long-term daily budget is unchanged.
Daily cap Hard ceiling on new cards per day regardless of budget headroom. Useful if you want to pace introduction even when you have spare time.
Apply automatically When enabled, the add-on also sets your new-card limit when Anki opens and after each sync, using the saved settings.

Buttons

  • Save β€” Save the settings and set today's new-card limit. The dialog stays open.
  • Closing the window ([x] or Escape) changes nothing. If you have unsaved changes, you'll be asked whether to save them first.

Nothing is written to your collection until you press Save (or, for decks with "Apply automatically" enabled, until Anki starts or finishes a sync). The forecast panel is always a preview.

Forecast panel

The forecast shows:

  • Today's new-card limit β€” Cards the add-on would allow today.
  • Studied today (this deck) β€” Minutes logged in your revlog for this deck today, and how much budget remains.
  • Busiest day β€” The heaviest day in the long-term plan (should stay near your budget).
  • Busiest day (existing cards) β€” Predicted load from cards already in your collection, with no new cards added.
  • Your speed β€” Time per new card, pass, and lapse derived from your actual review history.

Subdecks

Configure either a parent deck or its subdecks, not both. Two rules that match overlapping decks each write their own limit and will fight over it. The simplest setup is one rule for the top-level deck you actually study from.

Configuration

Settings are stored in Anki's add-on config system (config.json / the Add-ons manager). Each entry in the decks array matches one or more decks by name.

{
  "decks": [
    {
      "deckNames": ["My Deck"],
      "budgetMinutes": 30,
      "horizonDays": 365,
      "dailyNewCap": null,
      "active": false
    }
  ]
}
Key Type Default Description
deckNames string or list required Deck name(s) to match. A bare string is treated as a regex (re.fullmatch).
budgetMinutes float 30 Daily study-time budget in minutes.
horizonDays int 365 Planning horizon. The add-on also auto-estimates a minimum horizon based on deck size.
dailyNewCap int or null null Maximum new cards per day. null means no cap.
active bool false Automatically apply limits when Anki opens and after sync. Pressing Save in the dialog always applies immediately, regardless of this setting.

Development

Requirements

pip install -r requirements-dev.txt

Running tests and lint

pytest -v
ruff check time_budget tests build.py
ruff format --check time_budget tests build.py

Both also run in CI (GitHub Actions) on every push and pull request.

Tests are split into three groups:

  • Pure logic (tests/test_kernel.py, tests/test_controller.py, tests/test_settings.py) β€” no Anki dependency, fast.
  • Integration (tests/test_fake_collection.py) β€” uses a headless throwaway Anki collection.
  • The kernel test replays 400 random review sequences against the py-fsrs reference implementation and requires agreement to < 1e-6.

Building

python build.py

Produces time_budget.ankiaddon in the project root. The script zips the time_budget/ package flat (files at zip root, no parent directory prefix), which is required by Anki's add-on installer.

Project layout

time_budget/
  __init__.py     # Entry point: Tools menu + hook registration
  scheduler.py    # FSRS-6 kernel + MPC controller (no Anki imports)
  adapter.py      # Anki collection interface + planning pipeline
  ui.py           # The Time Budget dialog
  hooks.py        # Auto-apply on profile open / after sync
  settings.py     # Validated view of the user-editable config
  constants.py    # Shared constants
  config.json     # Default config
  manifest.json   # Add-on metadata

tests/
  conftest.py
  fake_collection_builder.py
  test_kernel.py
  test_controller.py
  test_fake_collection.py

build.py          # Packaging script

Bugs and contributions

Please report problems on the issue tracker. Include:

  • your Anki version (Help β†’ About),
  • the deck's rough size (new / learning / review counts),
  • the exact warning or error text if the dialog showed one.

Pull requests are welcome β€” run pytest, ruff check, and ruff format before submitting (CI enforces all three).

License

MIT