Saturday, June 4, 2022

[SOLVED] Let code run after logout

Issue

I have a long code that extracts data from a file, stores it in a dictionary, and inserts it into a mysql table. I need to loop this over a folder of nearly 1000 files, and this will take hours. I have seen a lot of conflicting advice and am not sure which is the simplest and most safe. Is there a command I can run that'll let the code keep running even if I log out of my user on the computer (which means the terminals will be quit out of)? I have not started running it yet.


Solution

You could run your code in a screen or on tmux.



Answered By - chris.mclennon
Answer Checked By - Katrina (WPSolving Volunteer)