{"id":1713,"date":"2009-03-29T16:03:53","date_gmt":"2009-03-29T20:03:53","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=1713"},"modified":"2009-03-29T16:03:53","modified_gmt":"2009-03-29T20:03:53","slug":"viewing-all-cron-jobs","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/03\/29\/viewing-all-cron-jobs\/","title":{"rendered":"Viewing all cron jobs"},"content":{"rendered":"<p>Periodically I run into the situation where I&#8217;m trying to find a cron job on a particular machine, but I can&#8217;t remember which user owns it. At least on CentOS, it&#8217;s easy:<\/p>\n<p><tt>cat \/var\/spool\/cron\/*<\/tt> will show all crons. The <tt>crontab<\/tt> command doesn&#8217;t seem to support doing this. The downside is that that command just mashes them all into one list, which is only useful if you don&#8217;t care who the job runs as. Usually I do. Here&#8217;s a simple little script to format the output a little bit:<\/p>\n<pre>\nfor i in `ls \/var\/spool\/cron\/`; do\n        echo \"Viewing crons for $i\"\n        echo \"--------------------------------------\"\n        cat \/var\/spool\/cron\/$i\n        echo\ndone\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>Periodically I run into the situation where I&#8217;m trying to find a cron job on a particular machine, but I can&#8217;t remember which user owns it. At least on CentOS, it&#8217;s easy: cat \/var\/spool\/cron\/* will show all crons. The crontab &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/03\/29\/viewing-all-cron-jobs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13,22],"tags":[],"class_list":["post-1713","post","type-post","status-publish","format-standard","hentry","category-computers","category-linux-tips","category-programming"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=1713"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1713\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}