Now my question is, now can I limit the memory and swap space these cron jobs use, so the memory is not used up and my terminal doesn't get killed? Is there something I can do at the OS level?
Sim. Leia com atenção setrlimit (2) . Você deseja usar o ulimit
bash adequadamente.
Esteja ciente do comprometimento de memória .