Wait for Jobs

To wait for one or more jobs to complete, use the wx wait command.

% wx wait [options] jobId ...

wx wait


wx: Usage Message

WX WAIT:
        Wait for a specific job or list of jobs to complete,
        fail, or be forgotten
USAGE:
        % wx wait [OPTIONS] <jobId> ...
OPTIONS:
        -h                   -- Print this message.
        -q                   -- Quiet wait.
        -v                   -- Verbose (may be repeated up to 3 times)

        -dir <directory>     -- Wait for all jobs in the given directory.
        -subdirs <directory> -- Wait for all jobs in the given directory and
                                subdirectories.
        -select <rule>       -- Wait for all jobs in set defined by 'rule'.
                                The predicate 'isjob' is automatically added
                                to the rule.
        -set <setName>       -- Wait for all jobs in a set.
        -start               -- Wait for the specified jobs to start.
        -p                   -- Use polling method (automatic delay)
        -poll <MS>           -- Use polling method with a delay of <MS>
                                milliseconds.
                                MS values are between 2000 and 60000.
        -k                   -- Jobs are killed if you interrupt wait
                                by Ctrl-C.
        -l                   -- Show log file of last job while waiting.
                                The log is shown either as it is created
                                if the job has been submitted with option -wl
                                or all at once upon job completion.
        -maxwait <timespec>  -- Specify a maximum wait time.
        -timeout <timespec>  -- Same as -maxwait
        -jobinfo             -- Show info about jobs being executed.
        -callback <cmd>      -- Execute 'cmd JOBID JOBSTATUS' for every job
                                that completes. Output to stdout.
                                Errors ignored.
        -file <file>         -- For experts. Source <file>, mostly to define
                                overrides for procedure VncWaitCallback
                                { cmd jobId status }

RETURN:
        0       -- All jobs are done, or started if -start is specified.
        1       -- Some jobs are still invalid.
        2       -- Some jobs are failed.
        3       -- Some jobs have unexpected status.
        4       -- Some jobs have been lost.
        5       -- Waited for long enough (see -maxwait option)

EXAMPLES:
        % wx wait 22345 22356
        % wx wait -dir .
        % wx wait -subdirs .
        % wx wait -select "command~spice"
        % wx wait -set   "myset"
        % wx wait -callback ./myScript  -set myset
        % wx wait -jobinfo  -set myset
        % wx wait -p -set myset
        % wx wait -poll 5000 -set myset
        % wx wait -maxwait 1m -set myset