Monday, March 28, 2011

[Linux] Prevent a background process from being stopped after closing SSH client

Just find that the job could be run in the background on the server without being killed after log off the SSH terminal. Great!

Moreover, it will send you an email after the job is done! 

The wonderful command is:

the 'batch' command.

$ batch > mycommand -x arg1 -y arg2 -z arg3 > ^D

This stuffs it in to the background, and then mails the results to you. It's a part of cron.

Reference from:

Posted via email from Troy's posterous

1 comment: