Problem to be addressed:

You wish to run a command which will take a long time to finish on a computer that you have to securely log into (ssh command).

Steps

This can be done with any command, it only requires adding something at the beginning of the line and the end of the line, with the command you want to run in the middle.

  1. To the beginning of the line add: "nohup"
  2. To the end of the line add ">& logfile.txt &"
    • the final & is the important part and is required.
    • the ">& logfile.txt" will store the standard output and standard errors (ie what you would normally see printed to the screen if you were running the command under normal conditions) in a new file named logfile.txt. This can be an easy way to test if your task has finished when you log back in later.

Example: nohup python pythonscript.py -o options >& logfile.txt &

Notes:

This should only be done on remote computers that this is allowable. A prime example of where this is a bad idea is TACC, for TACC use the standard job submission protocols. This is ideal for scripts which exceed TACC's time limits and can be done on one of our computers. Ask Dan for details about how to log into these computers.

-- Main.DanielDeatherage - 08 Sep 2014


This topic: Lab > WebHome > ComputationList > AllowDisconnection
Topic revision: r1 - 2014-09-08 - DanielDeatherage