|
|
|
[First name],
|
|
This week's question was inspired by a problem that's caught many developers by surprise: sometimes more jobs are running than you might think, all vying for the same system resources, and sometimes getting in each others way.
|
How can I see every cron job that's currently running?
|
|
To view all running cron jobs, list every process started by the cron daemon:
|
|
ps h --ppid $(pgrep cron)
|
|
This one-liner works because in the background when crond runs a scheduled job, it makes an operating system exec call to start a new process, and as a result, all running cron jobs are created as child processes of crond.
|
|
Until next week!
|
|
|
|
|
|
|
|
|
|
|