I started a script on a server using "at":
at now < script.sh
My problem is, that the script repeatedly starts new processes. Is it possible to stop the whole script instead of killing the single processes using "top"? I can not find the running script using "top", "bg" or "ps aux". I could not find a solution using google, only solutions to kill foreground jobs are offered.
Killing the process id at now < script.sh &
spills out does not work either:
user@linux:$ at now < script.sh &
[1] 16428
warning: commands will be executed using /bin/sh
user@linux:$ job 3 at Sat Sep 10 11:58:00 2016
[1]+ Fertig at now < script.sh
user@linux:$ kill 16428
bash: kill: (16428) - Kein passender Prozess gefunden
"Kein passender Prozess gefunden" means "no matching process found".
at now < script.sh &
and killed the PID it spits out? – cutrightjm Sep 9 '16 at 21:47at
program just submits your commands for execution and exits immediately, so its pid is useless; the execution is done by a different process(es). While running it(they) should show in BSD-styleps ax
but might be easier to find if you use ATT-styleps -fu yourusernameornumber
and focus on the entries with?
underTTY
. – dave_thompson_085 Sep 10 '16 at 11:52&
( background job/process in same shell ) andat
(detached shell). I would advise to use eitherat now < script.sh
orscript.sh &
depending on your need. – Archemar Sep 12 '16 at 13:01