A precise project scheduling engine with minute-level accuracy for resource allocation and dependency management.
Project description
ScriptPlan
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
Usage
Command Line
scriptplan project.tjp
scriptplan --output-dir ./reports project.tjp
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}")
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:
- Anchors packaging to end at 16:00 on July 18
- Schedules both assembly tasks to complete before packaging starts
- Resolves resource contention (single machine) by sequencing assemblies back-to-back
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scriptplan-0.9.0.tar.gz.
File metadata
- Download URL: scriptplan-0.9.0.tar.gz
- Upload date:
- Size: 157.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d8e2087430e58f8921b93ddadd6e8d4d47c00d1e70a92c831b685ef7cc8c38c
|
|
| MD5 |
ea60db5a0e93b1563f3c9d9661fb943a
|
|
| BLAKE2b-256 |
55d63cd6a52c0c433aad8cdf39df350600301d1dd99b5e39c8a21bdbb389a1a8
|
File details
Details for the file scriptplan-0.9.0-py3-none-any.whl.
File metadata
- Download URL: scriptplan-0.9.0-py3-none-any.whl
- Upload date:
- Size: 130.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4e76d1e03428b7258271d79a5fffe8e3576d8dd545d0e2583a3fd45aa4ed897
|
|
| MD5 |
783eb46a6b7a799859356754b27cfda4
|
|
| BLAKE2b-256 |
e4fb85efb6692d1e3bc07b922447661172264fef4cdabcfc73589d62050c1492
|