{"action":"created","issue":{"url":"https://api.github.com/repos/celluloid/timers/issues/49","labels_url":"https://api.github.com/repos/celluloid/timers/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/celluloid/timers/issues/49/comments","events_url":"https://api.github.com/repos/celluloid/timers/issues/49/events","html_url":"https://github.com/celluloid/timers/pull/49","id":80040039,"number":49,"title":"Add in now_and_every","user":{"login":"tommyogp","id":734587,"avatar_url":"https://avatars.githubusercontent.com/u/734587?v=3","gravatar_id":"","url":"https://api.github.com/users/tommyogp","html_url":"https://github.com/tommyogp","followers_url":"https://api.github.com/users/tommyogp/followers","following_url":"https://api.github.com/users/tommyogp/following{/other_user}","gists_url":"https://api.github.com/users/tommyogp/gists{/gist_id}","starred_url":"https://api.github.com/users/tommyogp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tommyogp/subscriptions","organizations_url":"https://api.github.com/users/tommyogp/orgs","repos_url":"https://api.github.com/users/tommyogp/repos","events_url":"https://api.github.com/users/tommyogp/events{/privacy}","received_events_url":"https://api.github.com/users/tommyogp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-24T03:55:17Z","updated_at":"2015-05-25T02:47:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/celluloid/timers/pulls/49","html_url":"https://github.com/celluloid/timers/pull/49","diff_url":"https://github.com/celluloid/timers/pull/49.diff","patch_url":"https://github.com/celluloid/timers/pull/49.patch"},"body":"`now_and_every` works as `every`, except the first run is called immediately.\r\n\r\nI have faced a situation whereby I needed to schedule the task to run `every(5.minutes)`, but I didn't want to wait that long for the first run to be called. Of course, I could've done:\r\n\r\n1) have the block defined as a method\r\n2) call it immediately\r\n3) put it in `every`\r\n\r\nBut this is cumbersome. Therefore, `now_and_every` is a convenience to support this case.\r\n\r\nNOTE: refactored from `every_with_now`"},"comment":{"url":"https://api.github.com/repos/celluloid/timers/issues/comments/105099182","html_url":"https://github.com/celluloid/timers/pull/49#issuecomment-105099182","issue_url":"https://api.github.com/repos/celluloid/timers/issues/49","id":105099182,"user":{"login":"digitalextremist","id":21095,"avatar_url":"https://avatars.githubusercontent.com/u/21095?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalextremist","html_url":"https://github.com/digitalextremist","followers_url":"https://api.github.com/users/digitalextremist/followers","following_url":"https://api.github.com/users/digitalextremist/following{/other_user}","gists_url":"https://api.github.com/users/digitalextremist/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalextremist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalextremist/subscriptions","organizations_url":"https://api.github.com/users/digitalextremist/orgs","repos_url":"https://api.github.com/users/digitalextremist/repos","events_url":"https://api.github.com/users/digitalextremist/events{/privacy}","received_events_url":"https://api.github.com/users/digitalextremist/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T02:47:50Z","updated_at":"2015-05-25T02:47:50Z","body":"Right on. @tommyogp this ought to also be merged against `0.17.0-prerelease` which is nearest to being master. The current master branch is very, very far behind `0.17.0`"}}