{"action":"closed","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/1004","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/1004/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/1004/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/1004/events","html_url":"https://github.com/Unitech/PM2/issues/1004","id":57157696,"number":1004,"title":"PM2 won't restart a stopped process","user":{"login":"murphyj","id":194911,"avatar_url":"https://avatars.githubusercontent.com/u/194911?v=3","gravatar_id":"","url":"https://api.github.com/users/murphyj","html_url":"https://github.com/murphyj","followers_url":"https://api.github.com/users/murphyj/followers","following_url":"https://api.github.com/users/murphyj/following{/other_user}","gists_url":"https://api.github.com/users/murphyj/gists{/gist_id}","starred_url":"https://api.github.com/users/murphyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murphyj/subscriptions","organizations_url":"https://api.github.com/users/murphyj/orgs","repos_url":"https://api.github.com/users/murphyj/repos","events_url":"https://api.github.com/users/murphyj/events{/privacy}","received_events_url":"https://api.github.com/users/murphyj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-10T10:43:03Z","updated_at":"2015-02-13T10:50:29Z","closed_at":"2015-02-13T10:50:29Z","body":"I've tried to start a process. Stop the process then restart a process using the name of the process that was assigned.\r\n\r\nI assumed this would work (I've doctored the example so it doesn't show any project/personal details):\r\n\r\n```\r\n$ pm2 start ~/component1/index.js --name component1 && pm2 start ~/component2/index.js --name component2\r\n[PM2] Process /Users/me/component1/index.js launched\r\n┌──────────┬────┬──────┬──────┬────────┬───────────┬────────┬─────────────┬──────────┐\r\n│ App name │ id │ mode │ PID  │ status │ restarted │ uptime │      memory │ watching │\r\n├──────────┼────┼──────┼──────┼────────┼───────────┼────────┼─────────────┼──────────┤\r\n│ component1  │ 0  │ fork │ 8859 │ online │         0 │ 0s     │ 18.789 MB   │ disabled │\r\n└──────────┴────┴──────┴──────┴────────┴───────────┴────────┴─────────────┴──────────┘\r\n Use `pm2 info <id|name>` to get more details about an app\r\n[PM2] Process /Users/me/component2/index.js launched\r\n┌──────────┬────┬──────┬──────┬────────┬───────────┬────────┬─────────────┬──────────┐\r\n│ App name │ id │ mode │ PID  │ status │ restarted │ uptime │      memory │ watching │\r\n├──────────┼────┼──────┼──────┼────────┼───────────┼────────┼─────────────┼──────────┤\r\n│ component1  │ 0  │ fork │ 8859 │ online │         0 │ 0s     │ 30.094 MB   │ disabled │\r\n│ component2 │ 1  │ fork │ 8874 │ online │         0 │ 0s     │ 18.371 MB   │ disabled │\r\n└──────────┴────┴──────┴──────┴────────┴───────────┴────────┴─────────────┴──────────┘\r\n Use `pm2 info <id|name>` to get more details about an app\r\n\r\n~/component1 on ⭠ task_my_ticket! ⌚ 10:34:17\r\n$ pm2 stop component1\r\n[PM2] Stopping component1\r\n[PM2] stopProcessId process id 0\r\n┌──────────┬────┬──────┬──────┬─────────┬───────────┬────────┬─────────────┬──────────┐\r\n│ App name │ id │ mode │ PID  │ status  │ restarted │ uptime │      memory │ watching │\r\n├──────────┼────┼──────┼──────┼─────────┼───────────┼────────┼─────────────┼──────────┤\r\n│ component1  │ 0  │ fork │ 8859 │ stopped │         0 │ 0      │      0 B    │ disabled │\r\n│ component2 │ 1  │ fork │ 8874 │ online  │         0 │ 6s     │ 30.223 MB   │ disabled │\r\n└──────────┴────┴──────┴──────┴─────────┴───────────┴────────┴─────────────┴──────────┘\r\n Use `pm2 info <id|name>` to get more details about an app\r\n\r\n~/component1 on ⭠ task_my_ticket! ⌚ 10:34:24\r\n$ pm2 restart component1\r\n[PM2] [ERROR] Process 0 not found\r\n```\r\nI'm running version 0.12.4 of pm2\r\n```\r\n$ pm2 -version\r\n0.12.4\r\n```\r\nIs anyone aware of a bug? Or am I using pm2 in a way that isn't expected?\r\n\r\nI posted a Question on Stack Overflow but it hasn't been answered yet: http://stackoverflow.com/questions/28369843/how-do-you-run-a-pm2-cron-job-without-caring-if-a-process-it-kicks-off-has-start"}}