I have converted my Mathematica notebook into .m file and need to run it in the background on a remote server. I am launching the run from my laptop, on a remote workstation. I need it to obey the follwoing conditions:
It should not get aborted when I close my laptop terminal/my internet connection gets severed; it should continue to run on the workstation
It should give me output and error messages in the .log/.out file and also an indication in the end showing that the run is complete.
I have tried 2 codes:
nohup time math < file.m > file.out &
nohup math -run "<<file.m" &> file.out&
The first command aborts when I close my laptop terminal, and the second command doesn't follow the second condition. I need both the conditions satisfied. Is there another command which I can use?