i have start.sh bash script that is running though CRON JOB on ubuntu server
start.sh contains bellow mentioned line
Why are you using nohup
? nohup
is a command that tells the running terminal to ignore the hangup signal. cron
, however, has no hangup signal, because it is not linked to a terminal session.
In this case, instead of:
nohup scrapy crawl first &
You probably want:
scrapy crawl first > first.txt &
The last example also works in a terminal, but when you close the terminal, the hangup signal (hup
) is sent, which ends the program.