{"action":"created","issue":{"url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/3","repository_url":"https://api.github.com/repos/dpjanes/iotdb-timers","labels_url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/3/comments","events_url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/3/events","html_url":"https://github.com/dpjanes/iotdb-timers/issues/3","id":151135420,"number":3,"title":"heartbeat (recalculating of times after midnight) not working for sun.js...","user":{"login":"codepoet4","id":15722515,"avatar_url":"https://avatars.githubusercontent.com/u/15722515?v=3","gravatar_id":"","url":"https://api.github.com/users/codepoet4","html_url":"https://github.com/codepoet4","followers_url":"https://api.github.com/users/codepoet4/followers","following_url":"https://api.github.com/users/codepoet4/following{/other_user}","gists_url":"https://api.github.com/users/codepoet4/gists{/gist_id}","starred_url":"https://api.github.com/users/codepoet4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codepoet4/subscriptions","organizations_url":"https://api.github.com/users/codepoet4/orgs","repos_url":"https://api.github.com/users/codepoet4/repos","events_url":"https://api.github.com/users/codepoet4/events{/privacy}","received_events_url":"https://api.github.com/users/codepoet4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-04-26T13:28:36Z","updated_at":"2016-04-30T12:02:07Z","closed_at":null,"body":"From the code, you have a typo of sorts in sun.js:\r\n\r\n```\r\n    // heartbeat\r\n    // see https://github.com/dpjanes/iotdb-timers/issues/1\r\n    // for possible improvements\r\n    self._schedule({\r\n        id: \"recalcuate-heartbeat\",\r\n        hour: 0,\r\n        day_repeat: 1\r\n    })\r\n\r\n    self.on(\"recalculate\", self._recalculate);\r\n```\r\n\r\nYou can See that the 'id' for the heartbeat is 'recalcuate-heartbeat', yet the event in the .on() is 'recalculate'.  Not sure why you have the '-heartbeat' at the end, and you also missed the second 'l' (ell) in recalculate.  (recalcu l ate, not recalcu ate)\r\n"},"comment":{"url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/comments/215959392","html_url":"https://github.com/dpjanes/iotdb-timers/issues/3#issuecomment-215959392","issue_url":"https://api.github.com/repos/dpjanes/iotdb-timers/issues/3","id":215959392,"user":{"login":"dpjanes","id":2311111,"avatar_url":"https://avatars.githubusercontent.com/u/2311111?v=3","gravatar_id":"","url":"https://api.github.com/users/dpjanes","html_url":"https://github.com/dpjanes","followers_url":"https://api.github.com/users/dpjanes/followers","following_url":"https://api.github.com/users/dpjanes/following{/other_user}","gists_url":"https://api.github.com/users/dpjanes/gists{/gist_id}","starred_url":"https://api.github.com/users/dpjanes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpjanes/subscriptions","organizations_url":"https://api.github.com/users/dpjanes/orgs","repos_url":"https://api.github.com/users/dpjanes/repos","events_url":"https://api.github.com/users/dpjanes/events{/privacy}","received_events_url":"https://api.github.com/users/dpjanes/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T12:02:07Z","updated_at":"2016-04-30T12:02:07Z","body":"Semicolons are optional in JS, though I generally add them. I'm going to\nrun up a Raspberry Pi and leave it running with this and see what we get.\n\nOn Fri, Apr 29, 2016 at 12:18 PM, code poet <notifications@github.com>\nwrote:\n\n>     // heartbeat\n>     // see https://github.com/dpjanes/iotdb-timers/issues/1\n>     // for possible improvements\n>     self._schedule({\n>         id: HEARTBEAT_ID,\n>         hour: 0,\n>         day_repeat: 1\n>     })\n>\n> Just glancing at the code... should there not be a ';' at the end of the\n> above statement? (I'm new to javascript/nodejs, so I apologize if this is a\n> stupid question).\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/dpjanes/iotdb-timers/issues/3#issuecomment-215789440>\n>\n"}}