Skip to main content

A precise project scheduling engine with minute-level accuracy for resource allocation and dependency management.

Project description

ScriptPlan

ScriptPlan

Logic Certified Tests Passed Temporal Physics Scheduling Constraints

A precise project scheduling engine with minute-level accuracy for resource allocation and dependency management. The syntax is compatible with TaskJuggler (.tjp files).

Installation

pip install scriptplan

Quick Start

Report Generation (Unix-style)

# Generate JSON report to stdout
plan report project.tjp

# Generate CSV report
plan report --csv project.tjp

# Save to file
plan report project.tjp > output.json
plan report --csv project.tjp > output.csv

# Read from stdin
cat project.tjp | plan report
plan report - < project.tjp

# Pipe to other tools
plan report project.tjp | jq '.data[0]'
plan report --csv project.tjp | csvkit

# Process multiple files
for f in projects/*.tjp; do
  plan report "$f" | jq -r '.report_id'
done

Output Format (JSON):

{
  "data": [
    {
      "id": "project.task1",
      "start": "2024-01-01-09:00",
      "end": "2024-01-05-17:00"
    }
  ],
  "columns": ["id", "start", "end"],
  "report_id": "ea3f901dd6426dfa58288d945819c75485fd9ff1875db59def350f219e2d62ca"
}

Features:

  • Output to stdout (Unix philosophy)
  • Messages to stderr
  • SHA256 report_id (content-based hash)
  • Lowercase column names
  • No HTML metadata
  • No file pollution (uses temp directories)
  • Safe for concurrent execution (100+ instances)

Python API

from scriptplan.parser.tjp_parser import ProjectFileParser

parser = ProjectFileParser()
project = parser.parse(open('project.tjp').read())

# Access scheduled tasks
for task in project.tasks:
    if task.leaf():
        start = task.get('start', 0)
        end = task.get('end', 0)
        print(f"{task.id}: {start} -> {end}")

System Certified

Certification Level: Airport-Grade / Mission Critical

Capabilities Verified:

  • Temporal Physics: Floating point precision, Timezones, DST awareness, Date Line crossing.

  • Resource Constraints: Daily/Weekly limits, Hierarchical quotas, Shift intersections.

  • Advanced Scheduling: ALAP (Backward pass), Priority preemption, Smart Resource Selection (Failover).

  • Workflow Logic: Atomicity (Contiguous), Perishability (Max Gap), Zero-Buffer Synchronization.

Features

  • Minute-level scheduling precision
  • ASAP and ALAP scheduling modes
  • Resource allocation with contention handling
  • Working hours and shift definitions
  • Dependency chains with gap constraints
  • Leap year and timezone handling

Accuracy

ScriptPlan uses integer arithmetic for all time calculations, avoiding floating-point drift. The scheduler correctly handles:

  • Non-standard shift boundaries (e.g., 08:13 - 11:59, 13:07 - 17:47)
  • Prime-number effort durations with prime-number gaps
  • Resource contention across multi-day tasks
  • Calendar gaps (weekends, holidays) vs working time gaps

Example: A chain of 500 tasks, each with 73-minute effort and 29-minute gaps, scheduled across leap year boundaries with non-standard shifts, produces exact minute-aligned results.

Example Project

project "Manufacturing" 2025-07-01 +1m {
  timezone "Etc/UTC"
  timeformat "%Y-%m-%d %H:%M"
  scheduling alap
}

shift factory_hours "Factory Hours" {
  workinghours mon - fri 08:00 - 16:00
}

resource machine "Press" {
  workinghours factory_hours
}

task delivery "Product Launch" {
  end 2025-07-18-16:00

  task pack "Packaging" {
    effort 8h
    allocate machine
  }

  task assemble_b "Body Assembly" {
    effort 16h
    allocate machine
    depends !!pack { onstart }
  }

  task assemble_a "Engine Assembly" {
    effort 16h
    allocate machine
  }
}

task connection_setup "Logic" {
  task set_deps "Apply" {
    depends !delivery.assemble_a, !delivery.assemble_b
    precedes !delivery.pack
  }
}

taskreport output "output" {
  formats csv
  columns id, start, end
  timeformat "%Y-%m-%d-%H:%M"
}

This project schedules backward from the delivery deadline (ALAP mode). The scheduler:

  1. Anchors packaging to end at 16:00 on July 18
  2. Schedules both assembly tasks to complete before packaging starts
  3. Resolves resource contention (single machine) by sequencing assemblies back-to-back
  4. Respects weekend boundaries (Mon-Fri working hours)

Result:

delivery.pack:       2025-07-18-08:00 -> 2025-07-18-16:00
delivery.assemble_a: 2025-07-14-08:00 -> 2025-07-15-16:00
delivery.assemble_b: 2025-07-16-08:00 -> 2025-07-17-16:00

License

Apache-2.0

Acknowledgments

ScriptPlan references TaskJuggler solely for file format compatibility. We have not used, modified, or copied any TaskJuggler source code. ScriptPlan is an independent, clean-room implementation.

  • The .tjp file format is documented publicly and widely used in the project management community
  • All scheduling algorithms, parser, and report generation in ScriptPlan are original implementations
  • TaskJuggler is mentioned only to indicate that ScriptPlan can read the same project file format

If you're looking for the original TaskJuggler with its full feature set including interactive HTML reports and GUI tools, please visit taskjuggler.org.

Why ScriptPlan?

This scheduler is part of Highway Workflow Engine's worker capacity management system. I decided to open-source it for the community to benefit from its precise scheduling capabilities. Thanks to TaskJuggler's established syntax, users can easily adopt ScriptPlan without learning a new format.

Yours, Farshid.

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

scriptplan-0.9.2.tar.gz (375.4 kB view details)

Uploaded Source

Built Distributions

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

scriptplan-0.9.2-cp314-cp314t-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp314-cp314-musllinux_1_2_x86_64.whl (851.6 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (854.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp313-cp313-musllinux_1_2_x86_64.whl (852.6 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp312-cp312-musllinux_1_2_x86_64.whl (854.0 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (860.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp311-cp311-musllinux_1_2_x86_64.whl (840.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (838.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp310-cp310-musllinux_1_2_x86_64.whl (809.7 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (811.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

scriptplan-0.9.2-cp39-cp39-musllinux_1_2_x86_64.whl (808.1 kB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

scriptplan-0.9.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (809.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

File details

Details for the file scriptplan-0.9.2.tar.gz.

File metadata

  • Download URL: scriptplan-0.9.2.tar.gz
  • Upload date:
  • Size: 375.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for scriptplan-0.9.2.tar.gz
Algorithm Hash digest
SHA256 9dda2583131a050c266d5fe23d6c41f9faf60f62cc174c4e64175c217bff610a
MD5 bacfb9fae3edbc94100d772eda9b2a6e
BLAKE2b-256 bdb1933df8580eebf3025ac084b7d670961d49873d38195f7785669e9c55bab0

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 74bbfd072255176e53ac90b0b092213631423327c411486d3a8c5cbad1de11bf
MD5 d8d4cc06140a34e6f699ba6dc905549d
BLAKE2b-256 f296dd8809cb164e1c001c93e69f3bd8ac5bfd420f8d19d7bb2a3782ba982ab9

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bd738cf767aefa0480f8a80635d3d29cffe8ad11368bf0e69077006cf4735c9e
MD5 a6bf838b7b196decb5fe0333d0d6aed5
BLAKE2b-256 f45a90e13e9f2959b2ae159ae230af9fbc489ee358d76081f5d8a6cf81f83f5e

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 64d219a8b10bed01f4882c3e9fecd75f4fd8f5b0056215806d3958cb1b87e5e5
MD5 657c7c1f71e1b2abb85e39b0a6b8a34b
BLAKE2b-256 98a0b75aa67f72f3584684f51350caca9febdddfab446fe980ba4b4637c11ef2

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2aa639b553fb57b99362a4c68ec8432d0b2fd833ac9fc45f6fa34421cbe884a0
MD5 fa4a609551da02410edfaf5b79e61aa7
BLAKE2b-256 3b92c8d7f2ad621bf527e2a9a5d6b619c84598c17fa034c458c562a12c7d30b0

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 347bfbc572c11255a801af1d8f85b06a229a0359d61a499c3d5e46d4284d3603
MD5 276d734db46c70fb1f43c1549444f655
BLAKE2b-256 7e36496b4e5a2e92493cc21ac10072d79ddd0b8b327a4a412687d183c5f4e795

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 342d8ae6851cf5c6b85b880bc2622fac1bf040f7e58a6068bcc1fe8f4e26fe86
MD5 44ff7ccb189c56219229f5d28bb2517c
BLAKE2b-256 c30f0c2d71894aa00d6bd7ac1361839810bba5d8e19d2aa2c0771191230c9691

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 66447f649746fc5d3c7930e19e3a3a48d200b0054f797388e314f0e8b18bab72
MD5 289a9f6275aed5aaa5c1e178b114c7b9
BLAKE2b-256 1196db10c236d7fd94853423ccd4c5402f5742255f591f82f49a9fc97d88013b

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 76600dd5fa25e8054f957fcccba10fedfcda4765d2dd20f72a48a669c3266b97
MD5 1597a4b15d199396833defc8aad906e1
BLAKE2b-256 0f8f381d0705f3a9102494267fd54dac6aeac38f41af1f750cef910944e54dea

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e8ea9525e1ae291fae3d4da69295829bd439b3aab21305c3ddca7e0f8d925c95
MD5 be677fcd7db8d2985cb919f46c4f0e5f
BLAKE2b-256 8967bd1eff97d0a245ce065bfa181b39e4cc8696cefc832f4005df3fdad5f36c

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 426e33b69013c89a0ee8b8feb6c1919d4e2b203e05ea4c2172a7afd87ab37a0b
MD5 bc484d252d27102e059bd6ec69cdbefd
BLAKE2b-256 a7e9d9755a9fba139c80dafcb154fdc8f662d5938d0d20bda7f4cfb115ec56bb

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ad9140b5647f8076aa294d59d557e2cea0ce4b61c36e1aabc084ca06bcd29e67
MD5 deba3bc9aa82ce441640db90d1b840d1
BLAKE2b-256 ac6f3ae3e27ffd92cfa4af1ff56b1690be739a353dad04312a17811178a2afb6

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 45a1747c2b01f32f12531d1774a5542e7ac64d3cdff5c752bb1431b4fa13fd8e
MD5 ed79c1af6b2cabea5639b8302414654c
BLAKE2b-256 9880d9fd48af7f8f6bd7521bda3f96cc5ff3f4788e612ea5c924a840b1a081a2

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a1697a316bd119bc6e21457c9c7dba08c2539ab68e6189a8c7973029142bdee1
MD5 af802aa25b1811cf0a58f3bf359397cb
BLAKE2b-256 97daf275c403c7da37eca3e448500313e304d975f261b1fd4a3c840ca6c7bede

See more details on using hashes here.

File details

Details for the file scriptplan-0.9.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for scriptplan-0.9.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bece30197fcc62230d682db1a67c09905649dcd60b56d7d15a579b024ce0267d
MD5 52123bfb373ca72109c7311fff1495f3
BLAKE2b-256 4c410df855d6fcc909d23fbc4b7c435f431d7f2827196f2c333b7a3c15070c46

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