Skip to content

Job orchestration

molq

Submit, track, and inspect the same workload on your laptop or an HPC cluster. molq keeps scheduler details at the edge and job history in one durable queue.

molq documentation

Start local

One queue, seven lines

Begin with a real local process. The same submit_job() and wait() calls work when the destination becomes SLURM, PBS, or LSF.

import molq as mq

cluster = mq.Cluster("laptop", "local")
with mq.Submitor(target=cluster) as queue:
    job = queue.submit_job(
        argv=["python", "-c", "print('hello from molq')"]
    )
    result = job.wait()

print(result.state.value)

Choose a path

Find the page you need

Mental model

Four objects are enough

Cluster describes a destination. Submitor owns submission and tracking. JobHandle follows one submitted job. JobRecord is an immutable snapshot you can store, print, or return from a service.

Cluster
Scheduler plus transport: what queue system to use and where its commands execute.
Submitor
The lifecycle boundary: submission, SQLite history, reconciliation, retries, and events.
JobHandle
The live convenience object returned by submission: status, refresh, wait, and cancel.
JobRecord
A frozen view of state, timestamps, exit status, command metadata, and artifact paths.

Backends

Change the destination, keep the workflow