{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/44627368","id":44627368,"diff_hunk":"@@ -0,0 +1,163 @@\n+<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->\n+\n+<!-- BEGIN STRIP_FOR_RELEASE -->\n+\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+<img src=\"http://kubernetes.io/img/warning.png\" alt=\"WARNING\"\n+     width=\"25\" height=\"25\">\n+\n+<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>\n+\n+If you are using a released version of Kubernetes, you should\n+refer to the docs that go with that version.\n+\n+<strong>\n+The latest 1.0.x release of this document can be found\n+[here](http://releases.k8s.io/release-1.0/docs/proposals/scheduledjob.md).\n+\n+Documentation for other releases can be found at\n+[releases.k8s.io](http://releases.k8s.io).\n+</strong>\n+--\n+\n+<!-- END STRIP_FOR_RELEASE -->\n+\n+<!-- END MUNGE: UNVERSIONED_WARNING -->\n+\n+# ScheduledJob Controller\n+\n+## Abstract\n+\n+A proposal for implementing a new controller - ScheduledJob controller - which\n+will be responsible for managing time based jobs, namely:\n+* once at a specified point in time,\n+* repeatedly at a specified point in time.\n+\n+There is already a discussion regarding that particular subject:\n+* Distributed CRON jobs [#2156](https://github.com/kubernetes/kubernetes/issues/2156)\n+\n+There are also similar solutions available, already:\n+* [Mesos Chronos](https://github.com/mesos/chronos)\n+* [Quartz](http://quartz-scheduler.org/)\n+\n+\n+## Use Cases\n+\n+1. Be able to schedule a job execution at a given point in time.\n+1. Be able to create a periodic job, eg. database backup, sending emails.\n+\n+\n+## Motivation\n+\n+ScheduledJobs are needed for performing all time related actions, namely backups,\n+report generation and alike.  Each of these tasks should be allowed to perform\n+repeatedly (once a day/month, etc.) or once at a given point in time.\n+\n+\n+## Implementation\n+\n+ScheduledJob controller relies heavily on the [Job Controller API](job.md)\n+for running actual jobs, on top of which it adds information regarding the date\n+and time part according to ISO8601 format.\n+\n+The new `ScheduledJob` object will have the following content:\n+\n+```go\n+// ScheduledJob represents the configuration of a single scheduled job.\n+type ScheduledJob struct {\n+    TypeMeta\n+    ObjectMeta\n+\n+    // Spec is a structure defining the expected behavior of a job, including the schedule.\n+    Spec ScheduledJobSpec\n+\n+    // Status is a structure describing current status of a job.\n+    Status ScheduledJobStatus\n+}\n+\n+// ScheduledJobList is a collection of scheduled jobs.\n+type ScheduledJobList struct {\n+    TypeMeta\n+    ListMeta\n+\n+    Items []ScheduledJob\n+}\n+```\n+\n+`ScheduledJobSpec` structure is defined to contain all the information how the actual\n+job execution will look like, including the `JobSpec` from [Job Controller API](job.md)\n+and the schedule in ISO8601 format.  This implies that each ScheduledJob execution\n+will be created from the JobSpec actual at a point in time when the execution will\n+be started.\n+\n+```go\n+// ScheduledJobSpec describes how the job execution will look like and when it will actually run.\n+type ScheduledJobSpec struct {\n+\n+    // Template is the object that describes the job that will be created when\n+    // executing a ScheduledJob.\n+    Template *JobSpec\n+\n+    // Selector is a label query over created jobs, sorted and distinguished by CreationTimestamp.\n+    Selector map[string]string\n+\n+    // Schedule contains the schedule in ISO8601 format, eg.\n+    // - 2015-07-21T14:00:00Z - represents date and time in UTC\n+    // - R/2015-07-21T14:00:00Z/P1D - represents endlessly repeating interval (1 day), starting from given date\n+    Schedule string\n+","path":"docs/proposals/scheduledjob.md","position":115,"original_position":115,"commit_id":"e234d1f91b25a3bb16d4412459cd761416a2b248","original_commit_id":"e234d1f91b25a3bb16d4412459cd761416a2b248","user":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"body":"Maybe an example would help.\r\n\r\nFor instance, one might change `R/2015-07-21T14:00:00Z/P1D` to `R/2015-07-26T20:00:00Z/P1D`. \r\n\r\n@sdminonne Do you want to be able to independently change the start date, start time, and periodicity?","created_at":"2015-11-12T07:20:11Z","updated_at":"2015-11-12T07:20:11Z","html_url":"https://github.com/kubernetes/kubernetes/pull/11980#discussion_r44627368","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/44627368"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/11980#discussion_r44627368"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980","id":41132493,"html_url":"https://github.com/kubernetes/kubernetes/pull/11980","diff_url":"https://github.com/kubernetes/kubernetes/pull/11980.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/11980.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/11980","number":11980,"state":"open","locked":false,"title":"ScheduledJob controller proposal","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"body":"Diverged from #11746.\r\n\r\n// cc @smarterclayton @timothysc @pmorie @bgrant0607 @davidopp @nwendling @derekwaynecarr @erictune @mikedanese @thockin ","created_at":"2015-07-29T14:54:44Z","updated_at":"2015-11-12T07:20:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccde6fac1a7b4363bfa9607953c1507aba053604","assignee":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/16","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.2-candidate","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/16/labels","id":1278500,"number":16,"title":"v1.2-candidate","description":"Things to consider for next minor release.","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":199,"closed_issues":20,"state":"open","created_at":"2015-08-29T03:54:34Z","updated_at":"2015-11-12T03:25:40Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/11980/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e234d1f91b25a3bb16d4412459cd761416a2b248","head":{"label":"soltysh:scheduledjob_controller_proposal","ref":"scheduledjob_controller_proposal","sha":"e234d1f91b25a3bb16d4412459cd761416a2b248","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"repo":{"id":22375428,"name":"kubernetes","full_name":"soltysh/kubernetes","owner":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soltysh/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/soltysh/kubernetes","forks_url":"https://api.github.com/repos/soltysh/kubernetes/forks","keys_url":"https://api.github.com/repos/soltysh/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soltysh/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soltysh/kubernetes/teams","hooks_url":"https://api.github.com/repos/soltysh/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/soltysh/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/soltysh/kubernetes/events","assignees_url":"https://api.github.com/repos/soltysh/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/soltysh/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/soltysh/kubernetes/tags","blobs_url":"https://api.github.com/repos/soltysh/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soltysh/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soltysh/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/soltysh/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soltysh/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/soltysh/kubernetes/languages","stargazers_url":"https://api.github.com/repos/soltysh/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/soltysh/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/soltysh/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/soltysh/kubernetes/subscription","commits_url":"https://api.github.com/repos/soltysh/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/soltysh/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/soltysh/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/soltysh/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/soltysh/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/soltysh/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soltysh/kubernetes/merges","archive_url":"https://api.github.com/repos/soltysh/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soltysh/kubernetes/downloads","issues_url":"https://api.github.com/repos/soltysh/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/soltysh/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/soltysh/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/soltysh/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soltysh/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/soltysh/kubernetes/releases{/id}","created_at":"2014-07-29T09:56:32Z","updated_at":"2015-05-07T19:43:22Z","pushed_at":"2015-11-10T11:50:34Z","git_url":"git://github.com/soltysh/kubernetes.git","ssh_url":"git@github.com:soltysh/kubernetes.git","clone_url":"https://github.com/soltysh/kubernetes.git","svn_url":"https://github.com/soltysh/kubernetes","homepage":null,"size":129647,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"kubernetes:master","ref":"master","sha":"4d10def14f8cb9f6909d0fd914bf9cba5f38f2c1","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-11-12T06:45:42Z","pushed_at":"2015-11-12T06:45:14Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":524627,"stargazers_count":11205,"watchers_count":11205,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2932,"mirror_url":null,"open_issues_count":2264,"forks":2932,"open_issues":2264,"watchers":11205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/11980"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/11980"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/11980/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11980/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e234d1f91b25a3bb16d4412459cd761416a2b248"}}}}