{"id":33,"date":"2007-10-28T20:23:39","date_gmt":"2007-10-28T18:23:39","guid":{"rendered":"http:\/\/robin.meier.free.fr\/site\/?p=33"},"modified":"2007-10-28T20:23:39","modified_gmt":"2007-10-28T18:23:39","slug":"max-crash-demon","status":"publish","type":"post","link":"https:\/\/robinmeier.net\/?p=33","title":{"rendered":"Max Crash Demon"},"content":{"rendered":"<p>Here&#8217;s a <a href=\"http:\/\/robin.meier.free.fr\/neurob\/maxcrashdemon.zip\">little application<\/a> I wrote for a permanent installation.<br \/>\nThis python script will run a ps command every minute to check if max is still running. If max isn&#8217;t running, the script will restart max.<\/p>\n<p>go to \/Applications\/Utilities\/Console.app to see what maxcrashdemon sez.<\/p>\n<p>if you got apple&#8217;s developer tools installed, i recommend using the following python script. it allows you to choose which file to launch in case max crashes and can even send out emails to alert someone.<\/p>\n<p>just copy the code into a textfile &#8220;maxcrashdemon.py&#8221;. once you finished editing the code, double-click this file and BuildApplet.app will create an application, which you can then add to your login-items on the machine running the installation:<\/p>\n<pre lang=\"PYTHON\">############# Robin Meier Paris Octobre 2007 for soham sound #############\n\nimport commands #to use terminal commands\nimport smtplib #to send mails\nimport time #to sleep\n\ni = 1 #forever\n\ndef alert(server):\n\tsmtplib.SMTP(server).sendmail('edit_from@address.fr', 'edit_to@address.fr',\n\t\"\"\"yo, max crashed!!!! but don't worry... i just restarted max....\n\t\"\"\")\n\tsmtplib.SMTP(server).quit()\n\ncomm = 'ps -x | grep MaxMSP | grep -v grep' #instead of MaxMSP you could put any other application\n\nwhile i == 1:\n\tstillup = commands.getoutput(comm)\n\tif stillup == '' :\n\t\tprint \"ouch, send a mail and open max (or patch) again\"\n\t\tcommands.getoutput('open \/Applications\/MaxMSP\\ 4.6\/MaxMSP.app') #put the path to your patch here instead\n\t\talert('smtp.truc.fr') #you have to put a working SMTP server here\n\telse:\n\t\tprint \"everything fine\"\n\t\ttime.sleep(60) #check every 60 seconds - i wouldn't do this too often - go easy on your cpu...\n\t\tcontinue<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a little application I wrote for a permanent installation. This python script will run a ps command every minute to check if max is still running. If max isn&#8217;t running, the script will restart max. go to \/Applications\/Utilities\/Console.app to see what maxcrashdemon sez. if you got apple&#8217;s developer tools installed, i recommend using the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[81,23],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-code","tag-maxmsp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Max Crash Demon - robin meier wiratunga<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/robinmeier.net\/?p=33\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Max Crash Demon - robin meier wiratunga\" \/>\n<meta property=\"og:description\" content=\"Here&#8217;s a little application I wrote for a permanent installation. This python script will run a ps command every minute to check if max is still running. If max isn&#8217;t running, the script will restart max. go to \/Applications\/Utilities\/Console.app to see what maxcrashdemon sez. if you got apple&#8217;s developer tools installed, i recommend using the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/robinmeier.net\/?p=33\" \/>\n<meta property=\"og:site_name\" content=\"robin meier wiratunga\" \/>\n<meta property=\"article:published_time\" content=\"2007-10-28T18:23:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/robinmeier.net\/wp-content\/uploads\/2026\/03\/IMG_1638.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/#\\\/schema\\\/person\\\/4bb244780550926b09928d8d11a13fd0\"},\"headline\":\"Max Crash Demon\",\"datePublished\":\"2007-10-28T18:23:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33\"},\"wordCount\":128,\"keywords\":[\"code\",\"maxmsp\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33\",\"url\":\"https:\\\/\\\/robinmeier.net\\\/?p=33\",\"name\":\"Max Crash Demon - robin meier wiratunga\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/robinmeier.net\\\/#website\"},\"datePublished\":\"2007-10-28T18:23:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/robinmeier.net\\\/#\\\/schema\\\/person\\\/4bb244780550926b09928d8d11a13fd0\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/robinmeier.net\\\/?p=33\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/?p=33#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/robinmeier.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Max Crash Demon\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/#website\",\"url\":\"https:\\\/\\\/robinmeier.net\\\/\",\"name\":\"robin meier wiratunga\",\"description\":\"artist website and portfolio\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/robinmeier.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/robinmeier.net\\\/#\\\/schema\\\/person\\\/4bb244780550926b09928d8d11a13fd0\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/robinmeier.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Max Crash Demon - robin meier wiratunga","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/robinmeier.net\/?p=33","og_locale":"en_US","og_type":"article","og_title":"Max Crash Demon - robin meier wiratunga","og_description":"Here&#8217;s a little application I wrote for a permanent installation. This python script will run a ps command every minute to check if max is still running. If max isn&#8217;t running, the script will restart max. go to \/Applications\/Utilities\/Console.app to see what maxcrashdemon sez. if you got apple&#8217;s developer tools installed, i recommend using the [&hellip;]","og_url":"https:\/\/robinmeier.net\/?p=33","og_site_name":"robin meier wiratunga","article_published_time":"2007-10-28T18:23:39+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/robinmeier.net\/wp-content\/uploads\/2026\/03\/IMG_1638.jpeg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/robinmeier.net\/?p=33#article","isPartOf":{"@id":"https:\/\/robinmeier.net\/?p=33"},"author":{"name":"admin","@id":"https:\/\/robinmeier.net\/#\/schema\/person\/4bb244780550926b09928d8d11a13fd0"},"headline":"Max Crash Demon","datePublished":"2007-10-28T18:23:39+00:00","mainEntityOfPage":{"@id":"https:\/\/robinmeier.net\/?p=33"},"wordCount":128,"keywords":["code","maxmsp"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/robinmeier.net\/?p=33","url":"https:\/\/robinmeier.net\/?p=33","name":"Max Crash Demon - robin meier wiratunga","isPartOf":{"@id":"https:\/\/robinmeier.net\/#website"},"datePublished":"2007-10-28T18:23:39+00:00","author":{"@id":"https:\/\/robinmeier.net\/#\/schema\/person\/4bb244780550926b09928d8d11a13fd0"},"breadcrumb":{"@id":"https:\/\/robinmeier.net\/?p=33#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/robinmeier.net\/?p=33"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/robinmeier.net\/?p=33#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/robinmeier.net\/"},{"@type":"ListItem","position":2,"name":"Max Crash Demon"}]},{"@type":"WebSite","@id":"https:\/\/robinmeier.net\/#website","url":"https:\/\/robinmeier.net\/","name":"robin meier wiratunga","description":"artist website and portfolio","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/robinmeier.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/robinmeier.net\/#\/schema\/person\/4bb244780550926b09928d8d11a13fd0","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4300ef5db4c1119caab717a4f56d23ec6e575d5e9adcb709f19302aa42fdfdd1?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/robinmeier.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinmeier.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":1,"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/robinmeier.net\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions\/919"}],"wp:attachment":[{"href":"https:\/\/robinmeier.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinmeier.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinmeier.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}