Running scripts

beckonmuse

Dabbler
Joined
Jul 15, 2023
Messages
11
Hi guys, I'm still new to TrueNas. Currently I am working through the burn-in process. I have a script from the forum that I started running a couple of days ago, in the web interface, but the session timed out and I didn't know how how to return to see the script progress. So then I decided to run it through ssh, but I needed to restart my router and triggered a broken pipe error. So, I wanted to know what is the best way to run a script that will last for days and return to it in the event that session times out or I need to restart my router? Thanks.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
In general, you don't run programs or scripts that take a long time, from normal logins. I don't use the web interface login feature, so I don't know how it works.

Their is a program called tmux that allows you to keep programs running. Even if you get a network break or have to reboot your desktop. The older program screen does something similar, but some Linux distros, (like RHEL), are phasing it out.

So, it is worth learning tmux, and if not available, screen. Both launch a standard SHELL and then, from their, you can run your long running program or script.
 

beckonmuse

Dabbler
Joined
Jul 15, 2023
Messages
11
In general, you don't run programs or scripts that take a long time, from normal logins. I don't use the web interface login feature, so I don't know how it works.

Their is a program called tmux that allows you to keep programs running. Even if you get a network break or have to reboot your desktop. The older program screen does something similar, but some Linux distros, (like RHEL), are phasing it out.

So, it is worth learning tmux, and if not available, screen. Both launch a standard SHELL and then, from their, you can run your long running program or script.
Great! Thank you. I'll get reading. :smile:
 

beckonmuse

Dabbler
Joined
Jul 15, 2023
Messages
11
That was exactly what I needed. Thanks for your help!
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You are welcome.
 
Top