Maybe one of you Linux people knows the answer to this... I am actually using the Mac command line, but my understanding is that this is virtually identical to a Linux/Unix command line.
I am using vacant lab computers in my department building to run some simulations in the background. There are many such vacant computers on the weekends, so this is like a (free) poor man's parallelization for some of my larger simulations. Anyway, for each machine I start the sim script in R, then background and disown the process, and log out. There is a command at the end of the script to write the sim results to a little file in the /tmp/ directory (which persists across logouts) locally on that machine, and finally to transfer that file to an FTP server on my office machine using the curl command.
Everything works fine as long as I stay logged in at this machine, even with the process disowned. The results are sent to my office machine with no problems. But when I do this and then actually log out, it seems that everything works fine except that the final curl command never succeeds. That is, if I come back to the machine at a later time, log back in, and check the /tmp/ directory, I can see that the results file has been created and that it contains the expected contents. But it was never sent to my office machine. At this later time I can manually send the results to my office machine by typing in the same curl command that was included in the script. But it would be way easier if it just worked as planned.
How can I get my disowned R processes to successfully upload files via curl / FTP?
I am using vacant lab computers in my department building to run some simulations in the background. There are many such vacant computers on the weekends, so this is like a (free) poor man's parallelization for some of my larger simulations. Anyway, for each machine I start the sim script in R, then background and disown the process, and log out. There is a command at the end of the script to write the sim results to a little file in the /tmp/ directory (which persists across logouts) locally on that machine, and finally to transfer that file to an FTP server on my office machine using the curl command.
Everything works fine as long as I stay logged in at this machine, even with the process disowned. The results are sent to my office machine with no problems. But when I do this and then actually log out, it seems that everything works fine except that the final curl command never succeeds. That is, if I come back to the machine at a later time, log back in, and check the /tmp/ directory, I can see that the results file has been created and that it contains the expected contents. But it was never sent to my office machine. At this later time I can manually send the results to my office machine by typing in the same curl command that was included in the script. But it would be way easier if it just worked as planned.
How can I get my disowned R processes to successfully upload files via curl / FTP?