how to use nohup with parallel
1
0
Entering edit mode
10 months ago
gavin • 0

I run the follwing code in conda enviroment:

nohup cat list.txt |  parallel --jobs 10 fastq-dump {} --split-3 --gzip -O ./  > log.txt 2>&1 &

After I logging out from the terminal, the log.txt shows :

parallel: SIGHUP received. No new jobs will be started.

Is there anyway to continue the job after logging out?

parallel nohup • 1.0k views
ADD COMMENT
2
Entering edit mode

Using screen or tmux are better than nohup.

ADD REPLY
0
Entering edit mode

Thanks for your valuable suggestion!

ADD REPLY
1
Entering edit mode
10 months ago
MatthewP ★ 1.4k

After command

cat list.txt | parallel --jobs 10 fastq-dump {} --split-3 --gzip -O ./ > log.txt 2>&1 &

you can use jobs -l to get the job pid, then run disown xxx, "xxx" is your job pid, then you can exit shell and won't affect your job.

ADD COMMENT
0
Entering edit mode

Thanks, according to your suggestion, the following code work: disown -h -a

ADD REPLY

Login before adding your answer.

Traffic: 1755 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6