Skip to main content

Simple Command Line Job Manager

Project description

TQ -- Simple Command Line Job Manager

[![Latest Version](](

#### Description in English:

TQ (Task Queue) is a simple Command Line Job Manager. In principle TQ is
a very flexible and smart atd(8), which could arrange a series of jobs in
an efficient way.

(1) By default TQ will run the jobs one by one in the FIFO order.

(2) A job with high priority will be processed earlier.

(3) Given the estimated occupancy coefficient, jobs can be executed in
parallel as long as possible.

The management of job queue is based on SQLite3 database, in which
information about every job, including the start and end time, is stored.

#### 中文描述(Description in Chinese):


## Install

This tool is available via PIP: `pip3 install tq1`

## Usage

tq [P R] -- TASK

Available Actions:
start start TQ's daemon
stop stop TQ's daemon
log dump log to screen
ls fancy print of task queue
db print database content to screen
rm <ID> remove task with specified id, see ID with tq ls
clean remove finished tasks from queue
purge remove log file and sqlite3 db file

Apending Task:
-- TASK append TASK to the queue
p<P> -- TASK append TASK with priority P to the queue
r<R> -- TASK append TASK with resource occupancy R to the queue
P R -- TASK append TASK with priority P and estimated occupancy R
int P default 0 range [INT_MIN, INT_MAX], large=important
int R detault 10 range [1, 10], large=consuming

## Examples

0. Daemon: to start or stop the daemon
tq start
tq stop
1. Serial: the two given tasks should be executed one by one
tq -- sleep 100
tq -- sleep 100
2. Parallel: each task occupies 40% of resource.
In this example two tasks will be active at the same time.
tq r4 -- sleep 100
tq r4 -- sleep 100
tq r4 -- sleep 100
3. Priority: break the FIFO order of tasks. 1 > default Priority.
tq p1 -- sleep 100
4. Special Case: run the given task right away ignoring Pri and Rsc
tq 1 0 -- sleep 100

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tq1, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size tq1-0.3.1-py2.py3-none-any.whl (10.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page