I have a JS file that runs via node.js, so normally I crank open a terminal window and type something like node myfile.js and it runs and runs all day; fun.
I would avoid any direct interaction with the shell. It would probably be the safest, to solve it this way: