Linux, check the code for no cron jobs currently running? … here is a solution to the problem.
Linux, check the code for no cron jobs currently running?
How do I write a bash script that checks for cron jobs that are not currently running, and then does something simple?
I’m not referring to cron jobs that are scheduled to run at some point in time, I’m talking about actively running processes.
Thanks!
Solution
Interesting questions; )
for pid in `pgrep cron`; do
ps uh --ppid $pid;
done|grep -v CRON