For medium term jobs (more than 18 hours, but less than 28 days), or any job that you wish to leave running in the background (so you can log out) use longjob
.
Simply place the command(s) you want to run within a bash script, then run that script with longjob
, e.g
longjob -28day -c ./script_name.sh
You will be asked to enter your DICE password, then the job will run for up to 28 days. Read the longjob manual (man longjob
) for more details.
You can check that your longjob
process is running with
ps -ef | grep script_name.sh
This will only show that your script is running. Should you want to close all the processes spawned by it, you will need to look for these via ps -ef | grep [Your UUN}
. Then you can use the kill
command together with the process ID to end a process.
Make sure your script is executable by you, or longjob
will fail returning Permission denied
messages.
Remember to save your results regularly, and always nice
your processes (with at least a value of +10).
Rather than occupying a lab machine, it may be more appropriate to use a compute server. See our list of general purpose servers.
Long term jobs (greater than 28 days) need extra setup. Ask for this via the Support Form.