linuxgnu-parallel

Gnu-parallel resume when changing command


When resuming a parallel command with --resume, is the command allowed to change? In the docs on --resume, it states that

It it important that the input of the completed jobs is unchanged

but it doesn't mention if the command itself can change as long as the input doesn't change.

For example, if you start the command

parallel --gnu -j8 --joblog log.txt ls ::: <inputs>

and terminate it in the middle with Ctrl-C, can you resume with

parallel --gnu -j8 --joblog log.txt --resume ls -l ::: <inputs>

?

My use case is that my command is an exe that can take a long time for some inputs and I forgot to specify a flag on the exe to set the timeout. I would like to restart with a timeout set on the exe.


Solution

  • The key part is:

    As GNU parallel only looks at the sequence numbers
    

    So you can basically change everything, but GNU Parallel will skip the jobs with the sequence numbers in the joblog.