Task: n8n Upgrader

n8n workflow:
{"id":"1","name":"Check and Upgrade n8n","nodes":[{"name":"n8n Release RSS","type":"n8n-nodes-base.rssFeedRead","position":[620,270],"parameters":{"url":"https://github.com/n8n-io/n8n/releases.atom"},"typeVersion":1},{"name":"Cron","type":"n8n-nodes-base.cron","notes":"Every hour at 59 minutes","position":[440,270],"parameters":{"triggerTimes":{"item":[{"mode":"everyHour","minute":59}]}},"notesInFlow":true,"typeVersion":1},{"name":"Check for New Release","type":"n8n-nodes-base.function","position":[820,270],"parameters":{"functionCode":"items = items.filter(function(o){\n  return (o.json.title.search('n8n@')===0 && Date.parse(o.json.isoDate)>0 );\n});\n\nif (items.length >= 1) {\n  items = items.slice(0,1);\n  items[0].json.PostDate=Date.parse(items[0].json.isoDate)/1000;\n  items[0].json.LastRunDate=Math.round(((new Date()).getTime() / 1000)-3600);\n};\n\nreturn items;"},"typeVersion":1},{"name":"Check if the Posted Since Last Update","type":"n8n-nodes-base.if","position":[1020,270],"parameters":{"conditions":{"number":[{"value1":"={{$json[\"PostDate\"]}}","value2":"={{$json[\"LastRunDate\"]}}","operation":"largerEqual"}]}},"typeVersion":1},{"name":"Do Nothing","type":"n8n-nodes-base.noOp","disabled":true,"position":[1250,360],"parameters":{},"typeVersion":1},{"name":"Update n8n","type":"n8n-nodes-base.executeCommand","position":[1250,210],"parameters":{"command":"cd ~ && pm2 stop n8n && npm -g install n8n && pm2 start n8n"},"typeVersion":1}],"active":true,"settings":{"timezone":"America/Edmonton","executionTimeout":-1},"connections":{"Cron":{"main":[[{"node":"n8n Release RSS","type":"main","index":0}]]},"n8n Release RSS":{"main":[[{"node":"Check for New Release","type":"main","index":0}]]},"Check for New Release":{"main":[[{"node":"Check if the Posted Since Last Update","type":"main","index":0}]]},"Check if the Posted Since Last Update":{"main":[[{"node":"Update n8n","type":"main","index":0}],[{"node":"Do Nothing","type":"main","index":0}]]}}}