Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to pause an R script that is running?

Tags:

r

I am running a some analysis in R which is going to take at least 24 hours to finish. Is it possible to pause the function midway, so that I can take my computer to work and back?

like image 324
Anne Heloise Theo Avatar asked Oct 06 '22 13:10

Anne Heloise Theo


1 Answers

This is not possible AFAIK, but I believe you can just suspend your computer and the processes automatically will be paused.

If you are using Linux, you can also stop and continue a process manually using killall -STOP R and killall -CONT R commands. Take a look at this article and the comment section there, which contain useful information regarding this.

On Windows, you can maybe use the Task Manager or install special software that is capable of doing that. But I really do not know as I do not use Windows on a regular basis.

EDIT: even if you use kill or killall to pause the process, but shutdown the computer, you will lose the data.

like image 168
Timo Avatar answered Oct 10 '22 04:10

Timo