Changes between Version 2 and Version 3 of JobQueue


Ignore:
Timestamp:
Oct 27, 2009, 4:16:17 PM (11 years ago)
Author:
Vincent Caron
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JobQueue

    v2 v3  
    88 * Checkout with {{{svn co svn://forge.bearstech.com/forge/jobq}}}
    99
    10 '''jobq''' bla...
     10'''jobq''' manages a simple batch queue, where one job is run after the other.
     11Many queues can be run independently, and no specific privileges or
     12daemon is required. Queue info and statistics are syslogged.
    1113
     14It is especially useful for complex crontabs, to force sequential
     15execution of jobs that would otherwise run in parallel with unlimited
     16instances. Jobs and load can be regulated by 'run queues' very easily
     17with '''jobq'''.
    1218
    1319'''jobq''' is licensed under the [http://www.gnu.org/licenses/gpl.html GNU GPL 3.0].
    1420
     21
     22== Example usage ==
     23
     24Run two heavy jobs, first is run immediatly since queue
     25is initially empty (shows in processes but not in queue), the second one
     26is waiting (shows in queue).
     27
     28{{{
     29hal:~$ jobq heavy_job arg1
     30hal:~$ jobq heavy_job arg2 param2
     31
     32hal:~$ pgrep -lf heavy_job
     3310441 /usr/bin/heavy_job
     34
     35hal:~$ jobq
     36ID     Submission date      Command
     3710447  2009-10-27 16:06:59  heavy_job arg2 param2
     38
     39hal:~$ tail /var/log/user.log
     40Oct 27 16:06:52 hal jobq: queue runner started for 'default' (pid 10421)
     41Oct 27 16:06:52 hal job[10413]: start (delay:0 sec, todo:0): heavy_job arg1
     42Oct 27 16:07:22 hal job[10413]: done (time:30 sec, exit:0)
     43Oct 27 16:07:22 hal job[10447]: start (delay:23 sec, todo:0): heavy_job arg2 param2
     44Oct 27 16:07:27 hal job[10447]: done (time:5 sec, exit:0)
     45}}}
     46
     47Job 1 was scheduled and started at 16:06:52, and took 30 sec to complete.
     48
     49Job 2 was scheduled 7 secondes later at 16:06:59 (not logged), started at
     5016:07:22 (23 sec after sheduling) and took 5 sec to complete.
     51
     52
     53== Real life sample ==
     54