Cq is a project mainly written in PERL and SHELL, based on the View license.
Command queueing daemon
=pod
=head1 NAME
cq - command queue
=head1 SYNOPSIS
B
=head1 DESCRIPTION
cq is a simple command-queueing daemon and frontend. It runs a series of commands (jobs) in order in the background. It allows safe interactive editing and viewing of the job queue and editing of jobs without unnecessarily interrupting job execution.
=head2 Overview
cq is split into two parts: the B
cq operates within an B
When running, cqd executes a series of B
The queue may be edited on-the-fly by the user. While the queue is being edited, cqd will not remove jobs from it; it will wait until the user is done editing, then remove and run the next job. Similarly, jobs still on the queue may be edited by the user. If a job that would be made current is being edited, cqd will wait until the user finishes before running it.
cqd can run jobs using a user-specified wrapper program. For example, the author likes to run each job in a screen(1) instance.
=head1 OPTIONS
=over
=item B<-d> F
Use F
=back
=head1 CQ COMMANDS
=over
=item B
Makes F
=item B
Destroys the cq instance in F
=item B
Starts the cq daemon, cqd, which runs jobs in the job queue.
=item B
Stops the cq daemon, and hence stops the execution of jobs from the queue. If there is a job running, the daemon will complete it before exiting. To stop immediately, terminating the current job, pass the B<-f> flag.
=item B
Cancels a previous B
=item B
Adds a new job to the end of the queue. The job is named I
=item B
Removes I
=item B
Opens the job specified by I
=item B
=item B
Opens the job queue for editing.
=item B[B
Shows the current value of I
=item B
Lists the jobs in the queue (and those not in the queue if such exist, though they really shouldn't, except during atomic queue modifications).
=item B
Explicitly tell cqd to reload its configuration file. (Unnecessary under normal circumstances.)
=item B
Explicitly tell cqd to rescan the queue. (Unnecessary under normal circumstances.)
=back
=head1 CONFIGURATION
cq has a simple rcfile-like configuration mechanism. An instance's config file
is found at I
Config files are line-oriented: the first word of a line specifies the configuration variable to set, and the remainder specifies its value. Unix-style comments (from '#' until end-of-line) are supported, and empty lines are ignored.
=head2 Configuration variables
=over
=item I
What command to use to run jobs. Parsed shell-style into a list of words, but not actually passed to sh(1). If any of the words is precisely '%s' (sans quotes), it is replaced with the full path to the job's run-file.
Warning: The precise handling of '%s' and other printf(3)-style escapes, as well as how this command is parsed (whether it is passed to sh(1), whether tilde-expansion or environment variable references are performed), may change in the future.
=back
=head1 SIGNALS
cq uses unix signals to communicate with cqd. For reference, cqd understands the following signals:
=over
=item B
The queue may have changed.
=item B
Stop running after finishing the current job.
=item B
Reload the configuration file.
=back
=head1 ENVIRONMENT VARIABLES
=over
=item I
The default instance directory. This is where cq stores job files, the job queue, lock files, and the other state it maintains.
=item I
The user's editor, invoked when editing of a job or of the job queue etc. is requested.
=back
=head1 BUGS
At the moment, cq is B
=head1 AUTHOR
Michael Arntzenius [email protected]
=cut