{"action":"created","comment":{"url":"https://api.github.com/repos/akira/exq/pulls/comments/35490155","id":35490155,"diff_hunk":"@@ -135,6 +138,18 @@ You can also enqueue jobs without starting workers:\n {:ok, ack} = Exq.Enqueuer.enqueue(:exq_enqueuer, \"default\", \"MyWorker\", [])\n \n ```\n+You can also schedule jobs to start at a future time:\n+You need to make scheduler_enable is set to true\n+\n+Schedule a job to start in 5 mins\n+```elixir\n+{:ok, ack} = Exq.enqueue_in(:exq, \"default\", 300, \"MyWorker\", [\"arg1\", \"arg2\"])","path":"README.md","position":21,"original_position":21,"commit_id":"7a364042492494f211fba5039eb62b938352784c","original_commit_id":"7a364042492494f211fba5039eb62b938352784c","user":{"login":"nicksanders","id":809448,"avatar_url":"https://avatars.githubusercontent.com/u/809448?v=3","gravatar_id":"","url":"https://api.github.com/users/nicksanders","html_url":"https://github.com/nicksanders","followers_url":"https://api.github.com/users/nicksanders/followers","following_url":"https://api.github.com/users/nicksanders/following{/other_user}","gists_url":"https://api.github.com/users/nicksanders/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksanders/subscriptions","organizations_url":"https://api.github.com/users/nicksanders/orgs","repos_url":"https://api.github.com/users/nicksanders/repos","events_url":"https://api.github.com/users/nicksanders/events{/privacy}","received_events_url":"https://api.github.com/users/nicksanders/received_events","type":"User","site_admin":false},"body":"I'm confused ;) it seems to be a bug in Timex but\r\n\r\nenqueue_in works for me in my app with Timex 0.13.5\r\nenqueue_in doesn't work in tests with Timex 0.13.5\r\nenqueue_in does work in tests with Timex 0.16.2 but the performance test now takes 50 secs instead of 10 secs\r\n\r\n\r\n\r\n","created_at":"2015-07-26T07:30:40Z","updated_at":"2015-07-26T07:30:40Z","html_url":"https://github.com/akira/exq/pull/76#discussion_r35490155","pull_request_url":"https://api.github.com/repos/akira/exq/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/akira/exq/pulls/comments/35490155"},"html":{"href":"https://github.com/akira/exq/pull/76#discussion_r35490155"},"pull_request":{"href":"https://api.github.com/repos/akira/exq/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/akira/exq/pulls/76","id":40516681,"html_url":"https://github.com/akira/exq/pull/76","diff_url":"https://github.com/akira/exq/pull/76.diff","patch_url":"https://github.com/akira/exq/pull/76.patch","issue_url":"https://api.github.com/repos/akira/exq/issues/76","number":76,"state":"open","locked":false,"title":"Add scheduled jobs","user":{"login":"nicksanders","id":809448,"avatar_url":"https://avatars.githubusercontent.com/u/809448?v=3","gravatar_id":"","url":"https://api.github.com/users/nicksanders","html_url":"https://github.com/nicksanders","followers_url":"https://api.github.com/users/nicksanders/followers","following_url":"https://api.github.com/users/nicksanders/following{/other_user}","gists_url":"https://api.github.com/users/nicksanders/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksanders/subscriptions","organizations_url":"https://api.github.com/users/nicksanders/orgs","repos_url":"https://api.github.com/users/nicksanders/repos","events_url":"https://api.github.com/users/nicksanders/events{/privacy}","received_events_url":"https://api.github.com/users/nicksanders/received_events","type":"User","site_admin":false},"body":"Based off #8 I have added a Task Scheduler, \r\n\r\nIt uses \"scheduled\" queues for each \"live\" queue which are sorted sets, when a scheduled job's time is reached the job is pulled from the \"scheduled\" queue and put on the \"live\" queue and then the manager deals with it as normal.\r\n\r\nI'm new to Elixir so I thought it best to get some feedback before I went any further.\r\n\r\nIt is working and api wise I think enqueue_in works but I'm not sure about the format for the time in enqueue_at, currently its a unix timestamp.\r\n\r\nAt the moment the jobs are scheduled with a 1 second resolution which works for me but I'm not sure how accurate others need the scheduling to be.\r\n\r\nI thought my next steps should be to add a setting to enable the scheduler which would default to false and also add tests and documentation for the new functionality.","created_at":"2015-07-21T23:35:04Z","updated_at":"2015-07-26T07:30:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8094e1f9bbb2fae5180a4708394725290ca47f30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akira/exq/pulls/76/commits","review_comments_url":"https://api.github.com/repos/akira/exq/pulls/76/comments","review_comment_url":"https://api.github.com/repos/akira/exq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akira/exq/issues/76/comments","statuses_url":"https://api.github.com/repos/akira/exq/statuses/7a364042492494f211fba5039eb62b938352784c","head":{"label":"nicksanders:scheduled_jobs","ref":"scheduled_jobs","sha":"7a364042492494f211fba5039eb62b938352784c","user":{"login":"nicksanders","id":809448,"avatar_url":"https://avatars.githubusercontent.com/u/809448?v=3","gravatar_id":"","url":"https://api.github.com/users/nicksanders","html_url":"https://github.com/nicksanders","followers_url":"https://api.github.com/users/nicksanders/followers","following_url":"https://api.github.com/users/nicksanders/following{/other_user}","gists_url":"https://api.github.com/users/nicksanders/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksanders/subscriptions","organizations_url":"https://api.github.com/users/nicksanders/orgs","repos_url":"https://api.github.com/users/nicksanders/repos","events_url":"https://api.github.com/users/nicksanders/events{/privacy}","received_events_url":"https://api.github.com/users/nicksanders/received_events","type":"User","site_admin":false},"repo":{"id":39330772,"name":"exq","full_name":"nicksanders/exq","owner":{"login":"nicksanders","id":809448,"avatar_url":"https://avatars.githubusercontent.com/u/809448?v=3","gravatar_id":"","url":"https://api.github.com/users/nicksanders","html_url":"https://github.com/nicksanders","followers_url":"https://api.github.com/users/nicksanders/followers","following_url":"https://api.github.com/users/nicksanders/following{/other_user}","gists_url":"https://api.github.com/users/nicksanders/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksanders/subscriptions","organizations_url":"https://api.github.com/users/nicksanders/orgs","repos_url":"https://api.github.com/users/nicksanders/repos","events_url":"https://api.github.com/users/nicksanders/events{/privacy}","received_events_url":"https://api.github.com/users/nicksanders/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicksanders/exq","description":"Job processing library for Elixir  - compatible with Resque / Sidekiq","fork":true,"url":"https://api.github.com/repos/nicksanders/exq","forks_url":"https://api.github.com/repos/nicksanders/exq/forks","keys_url":"https://api.github.com/repos/nicksanders/exq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicksanders/exq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicksanders/exq/teams","hooks_url":"https://api.github.com/repos/nicksanders/exq/hooks","issue_events_url":"https://api.github.com/repos/nicksanders/exq/issues/events{/number}","events_url":"https://api.github.com/repos/nicksanders/exq/events","assignees_url":"https://api.github.com/repos/nicksanders/exq/assignees{/user}","branches_url":"https://api.github.com/repos/nicksanders/exq/branches{/branch}","tags_url":"https://api.github.com/repos/nicksanders/exq/tags","blobs_url":"https://api.github.com/repos/nicksanders/exq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicksanders/exq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicksanders/exq/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicksanders/exq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicksanders/exq/statuses/{sha}","languages_url":"https://api.github.com/repos/nicksanders/exq/languages","stargazers_url":"https://api.github.com/repos/nicksanders/exq/stargazers","contributors_url":"https://api.github.com/repos/nicksanders/exq/contributors","subscribers_url":"https://api.github.com/repos/nicksanders/exq/subscribers","subscription_url":"https://api.github.com/repos/nicksanders/exq/subscription","commits_url":"https://api.github.com/repos/nicksanders/exq/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicksanders/exq/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicksanders/exq/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicksanders/exq/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicksanders/exq/contents/{+path}","compare_url":"https://api.github.com/repos/nicksanders/exq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicksanders/exq/merges","archive_url":"https://api.github.com/repos/nicksanders/exq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicksanders/exq/downloads","issues_url":"https://api.github.com/repos/nicksanders/exq/issues{/number}","pulls_url":"https://api.github.com/repos/nicksanders/exq/pulls{/number}","milestones_url":"https://api.github.com/repos/nicksanders/exq/milestones{/number}","notifications_url":"https://api.github.com/repos/nicksanders/exq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicksanders/exq/labels{/name}","releases_url":"https://api.github.com/repos/nicksanders/exq/releases{/id}","created_at":"2015-07-19T10:53:59Z","updated_at":"2015-07-19T10:54:00Z","pushed_at":"2015-07-25T22:41:38Z","git_url":"git://github.com/nicksanders/exq.git","ssh_url":"git@github.com:nicksanders/exq.git","clone_url":"https://github.com/nicksanders/exq.git","svn_url":"https://github.com/nicksanders/exq","homepage":null,"size":1664,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akira:master","ref":"master","sha":"4dd9ae9cbf97d795895e25214a5bb46575446765","user":{"login":"akira","id":43946,"avatar_url":"https://avatars.githubusercontent.com/u/43946?v=3","gravatar_id":"","url":"https://api.github.com/users/akira","html_url":"https://github.com/akira","followers_url":"https://api.github.com/users/akira/followers","following_url":"https://api.github.com/users/akira/following{/other_user}","gists_url":"https://api.github.com/users/akira/gists{/gist_id}","starred_url":"https://api.github.com/users/akira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akira/subscriptions","organizations_url":"https://api.github.com/users/akira/orgs","repos_url":"https://api.github.com/users/akira/repos","events_url":"https://api.github.com/users/akira/events{/privacy}","received_events_url":"https://api.github.com/users/akira/received_events","type":"User","site_admin":false},"repo":{"id":11782994,"name":"exq","full_name":"akira/exq","owner":{"login":"akira","id":43946,"avatar_url":"https://avatars.githubusercontent.com/u/43946?v=3","gravatar_id":"","url":"https://api.github.com/users/akira","html_url":"https://github.com/akira","followers_url":"https://api.github.com/users/akira/followers","following_url":"https://api.github.com/users/akira/following{/other_user}","gists_url":"https://api.github.com/users/akira/gists{/gist_id}","starred_url":"https://api.github.com/users/akira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akira/subscriptions","organizations_url":"https://api.github.com/users/akira/orgs","repos_url":"https://api.github.com/users/akira/repos","events_url":"https://api.github.com/users/akira/events{/privacy}","received_events_url":"https://api.github.com/users/akira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akira/exq","description":"Job processing library for Elixir  - compatible with Resque / Sidekiq","fork":false,"url":"https://api.github.com/repos/akira/exq","forks_url":"https://api.github.com/repos/akira/exq/forks","keys_url":"https://api.github.com/repos/akira/exq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akira/exq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akira/exq/teams","hooks_url":"https://api.github.com/repos/akira/exq/hooks","issue_events_url":"https://api.github.com/repos/akira/exq/issues/events{/number}","events_url":"https://api.github.com/repos/akira/exq/events","assignees_url":"https://api.github.com/repos/akira/exq/assignees{/user}","branches_url":"https://api.github.com/repos/akira/exq/branches{/branch}","tags_url":"https://api.github.com/repos/akira/exq/tags","blobs_url":"https://api.github.com/repos/akira/exq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akira/exq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akira/exq/git/refs{/sha}","trees_url":"https://api.github.com/repos/akira/exq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akira/exq/statuses/{sha}","languages_url":"https://api.github.com/repos/akira/exq/languages","stargazers_url":"https://api.github.com/repos/akira/exq/stargazers","contributors_url":"https://api.github.com/repos/akira/exq/contributors","subscribers_url":"https://api.github.com/repos/akira/exq/subscribers","subscription_url":"https://api.github.com/repos/akira/exq/subscription","commits_url":"https://api.github.com/repos/akira/exq/commits{/sha}","git_commits_url":"https://api.github.com/repos/akira/exq/git/commits{/sha}","comments_url":"https://api.github.com/repos/akira/exq/comments{/number}","issue_comment_url":"https://api.github.com/repos/akira/exq/issues/comments{/number}","contents_url":"https://api.github.com/repos/akira/exq/contents/{+path}","compare_url":"https://api.github.com/repos/akira/exq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akira/exq/merges","archive_url":"https://api.github.com/repos/akira/exq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akira/exq/downloads","issues_url":"https://api.github.com/repos/akira/exq/issues{/number}","pulls_url":"https://api.github.com/repos/akira/exq/pulls{/number}","milestones_url":"https://api.github.com/repos/akira/exq/milestones{/number}","notifications_url":"https://api.github.com/repos/akira/exq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akira/exq/labels{/name}","releases_url":"https://api.github.com/repos/akira/exq/releases{/id}","created_at":"2013-07-31T05:10:24Z","updated_at":"2015-07-25T03:36:23Z","pushed_at":"2015-07-26T00:46:35Z","git_url":"git://github.com/akira/exq.git","ssh_url":"git@github.com:akira/exq.git","clone_url":"https://github.com/akira/exq.git","svn_url":"https://github.com/akira/exq","homepage":null,"size":2265,"stargazers_count":82,"watchers_count":82,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akira/exq/pulls/76"},"html":{"href":"https://github.com/akira/exq/pull/76"},"issue":{"href":"https://api.github.com/repos/akira/exq/issues/76"},"comments":{"href":"https://api.github.com/repos/akira/exq/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/akira/exq/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/akira/exq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akira/exq/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/akira/exq/statuses/7a364042492494f211fba5039eb62b938352784c"}}}}