Kill all currently running cron jobs
Solution 1:
To kill all processes for the user, you have a few options. I like:
su - username
then kill -9 -1
To see which "cron" processes belong to user :
pgrep -u username cron
To kill those processes:
pkill -u username cron
Solution 2:
Use:
kill -6 $(pgrep -U username cron)
You can search with pgrep full string with -f
arg if you need to kill specific cron jobs, while let others live.
kill
signal is pretty dangerous really, so you should check what you are going to kill. If username is 'root' then you can kill important things, yes.