{"action":"created","issue":{"url":"https://api.github.com/repos/node-schedule/node-schedule/issues/107","labels_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/107/comments","events_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/107/events","html_url":"https://github.com/node-schedule/node-schedule/issues/107","id":60249228,"number":107,"title":"Different jobs with different recurrence rules: strange behaviour","user":{"login":"marbi","id":5158905,"avatar_url":"https://avatars.githubusercontent.com/u/5158905?v=3","gravatar_id":"","url":"https://api.github.com/users/marbi","html_url":"https://github.com/marbi","followers_url":"https://api.github.com/users/marbi/followers","following_url":"https://api.github.com/users/marbi/following{/other_user}","gists_url":"https://api.github.com/users/marbi/gists{/gist_id}","starred_url":"https://api.github.com/users/marbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marbi/subscriptions","organizations_url":"https://api.github.com/users/marbi/orgs","repos_url":"https://api.github.com/users/marbi/repos","events_url":"https://api.github.com/users/marbi/events{/privacy}","received_events_url":"https://api.github.com/users/marbi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-08T09:35:56Z","updated_at":"2015-03-09T09:58:31Z","closed_at":null,"body":"Example:\r\n```javascript\r\nvar rule1 = new schedule.RecurrenceRule();\r\nrule1.minute = new schedule.Range(0, 59, 1);\r\n\r\nvar rule2 = new schedule.RecurrenceRule();\r\nrule2.second = new schedule.Range(0, 59, 50);\r\n\r\nvar job1 = new schedule.Job(function() {\r\n\tconsole.log('job1 '+ new Date());\r\n});\r\n\r\nvar job2 = new schedule.Job(function() {\r\n\tconsole.log('job2 '+ new Date());\r\n});\r\n\r\njob1.schedule(rule1);\r\n\r\njob2.schedule(rule2);\r\n```\r\nOutput:\r\n```\r\njob2 Sat Mar 07 2015 23:47:50 GMT+0100 (CET)\r\njob1 Sat Mar 07 2015 23:48:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:48:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:48:50 GMT+0100 (CET)\r\njob1 Sat Mar 07 2015 23:49:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:49:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:49:50 GMT+0100 (CET)\r\njob1 Sat Mar 07 2015 23:50:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:50:00 GMT+0100 (CET)\r\njob2 Sat Mar 07 2015 23:50:50 GMT+0100 (CET)\r\n```\r\nWhen job1 fires you could see job2's console output too. It looks like job1 it's firing job2.\r\n"},"comment":{"url":"https://api.github.com/repos/node-schedule/node-schedule/issues/comments/77826306","html_url":"https://github.com/node-schedule/node-schedule/issues/107#issuecomment-77826306","issue_url":"https://api.github.com/repos/node-schedule/node-schedule/issues/107","id":77826306,"user":{"login":"santigimeno","id":1084056,"avatar_url":"https://avatars.githubusercontent.com/u/1084056?v=3","gravatar_id":"","url":"https://api.github.com/users/santigimeno","html_url":"https://github.com/santigimeno","followers_url":"https://api.github.com/users/santigimeno/followers","following_url":"https://api.github.com/users/santigimeno/following{/other_user}","gists_url":"https://api.github.com/users/santigimeno/gists{/gist_id}","starred_url":"https://api.github.com/users/santigimeno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santigimeno/subscriptions","organizations_url":"https://api.github.com/users/santigimeno/orgs","repos_url":"https://api.github.com/users/santigimeno/repos","events_url":"https://api.github.com/users/santigimeno/events{/privacy}","received_events_url":"https://api.github.com/users/santigimeno/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T09:58:31Z","updated_at":"2015-03-09T09:58:31Z","body":"Hi,\r\nIt doesn't look like a bug to me. When you define the range like this:\r\n```\r\nrule2.second = new schedule.Range(0, 59, 50);\r\n```\r\nThe job will fire at 0 and 50 seconds. Analogously, If you had defined the step to `10`, the job would have fired at 0, 10, 20, 30, 40, and 50 seconds."}}