{"action":"created","comment":{"url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/comments/92522184","pull_request_review_id":13039230,"id":92522184,"diff_hunk":"@@ -202,58 +198,95 @@ A cron expression is based on the cron UNIX tool, and is a way to specify a recu\n         ...\n     }\n \n-Cron syntax is very powerful, but also fairly complex.\n+A cron expression is a way to specify a recurring schedule, based on the UNIX cron tool.\n+The cron expression supported by SmartThings is a string of six or seven fields, separated by white space. \n+The *seconds* field is the left most field.\n+The below table describes these fields. \n+\n+============ ================ ======== =================\n+Field        Allowed Values   Required Allowed Wildcards\n+============ ================ ======== =================\n+Seconds      0-59             Yes      , - * /\n+Minutes      0-59             Yes      , - * /\n+Hours        0-23             Yes      , - * /\n+Day of Month 1-31             Yes      , - * ? / L W\n+Month        1-12 or JAN-DEC  Yes      , - * /\n+Day of Week  1-7 or SUN-SAT   Yes      , - * ? / L\n+Year         empty, 1970-2099 No       , - * /\n+============ ================ ======== =================\n+\n+**Allowed Wildcards**\n+\n+    - ``,`` (comma) is used to specify additional values. For example, SAT,SUN,MON in the Day of Week field means “the days Saturday, Sunday, and Monday.”\n+    - ``-`` (hyphen) is used to specify ranges. For example, ``5-7`` in the Hours field means “the hours 5, 6 and 7”.\n+    - ``*`` (asterisk) is used to specify all values in the field. For example, ``*`` in the Hours field means *every* hour.\n+    - ``?`` (question mark) is used to specify any value. For example, ``?`` in the Day of Week field means *regardless* of what the day of the week is.\n+    - ``/`` (forward slash) is used to specify increments. For example, ``5/15`` in the Seconds field means “the seconds 5, 20, 35, and 50”.\n+    - ``L`` is used to specify the last day of the month when used in the Day of Month field and the last day of the week when used in the Day of Week fields.\n+    - ``W`` is used to specify a weekday (Monday-Friday) that is nearest to the given day when used in the Day of Month field. For example, if you specify ``21W`` in the Day of Month field, it means: “the nearest weekday to the 21st of the month”. So if the 21st is a Saturday, the trigger will fire on Friday the 20th. If the 21st is a Sunday, the trigger will fire on Monday the 22nd. If the 21st is a Tuesday, then it will fire on Tuesday the 21st. However if you specify ``1W`` as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, and not on Friday, as it will not cross over the boundary of a month. The ``W`` character can only be specified when the day-of-month is a single day, not a range or list of days.\n+\n+.. warning::\n+\n+    You cannot specify both the *Day of Month* and the *Day of Week* fields in the same cron expression. \n+    If you specifiy one of these fields, the other one must be ``?``.\n+\n+Here is an example with the two fields, i.e., the *Day of Month* and the *Day of Week*. \n+In the table below cases A and C are invalid.\n \n-We recommend reading through the `Quartz Cron Trigger Tutorial`_ for some basic information and examples using the cron expression format.\n+====== ============ =========== ====================================================\n+Case   Day of Month Day of Week Cron Interpretation\n+====== ============ =========== ====================================================\n+A      `*`          MON         Every day of month *and* every Monday\n+B      `*`          ?           Every day of month *and* whatever be the day of week\n+C      23           `*`         Every 23rd of month *and* every day of week\n+D      ?            `*`         Whatever be the day of month *and* every day of week\n+====== ============ =========== ====================================================\n \n-We also recommend you test your cron expression before using it in a SmartApp or Device Handler.\n-It's easy to create a cron expression that doesn't do what you intended, and often this results in too many scheduled executions, resulting in a wide range of problems.\n+We recommend that you test your cron expression before using it in a SmartApp or Device Handler.\n The cron expression test tool we use is http://www.cronmaker.com/.\n \n .. note::\n \n-    High volume cron schedules are encouraged to specify a random seconds field.\n-    This helps to avoid a large number of scheduled executions being queued up at the same time.\n+    Cron jobs are only be allowed to run at a minimum of 1 minute intervals.","path":"smartapp-developers-guide/scheduling.rst","position":167,"original_position":167,"commit_id":"2197b022c2201e9df586c429b5f11c28d4aec03c","original_commit_id":"2197b022c2201e9df586c429b5f11c28d4aec03c","user":{"login":"charliek","id":24948,"avatar_url":"https://avatars.githubusercontent.com/u/24948?v=3","gravatar_id":"","url":"https://api.github.com/users/charliek","html_url":"https://github.com/charliek","followers_url":"https://api.github.com/users/charliek/followers","following_url":"https://api.github.com/users/charliek/following{/other_user}","gists_url":"https://api.github.com/users/charliek/gists{/gist_id}","starred_url":"https://api.github.com/users/charliek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charliek/subscriptions","organizations_url":"https://api.github.com/users/charliek/orgs","repos_url":"https://api.github.com/users/charliek/repos","events_url":"https://api.github.com/users/charliek/events{/privacy}","received_events_url":"https://api.github.com/users/charliek/received_events","type":"User","site_admin":false},"body":"Maximum of 1 minute intervals? ","created_at":"2016-12-15T00:34:27Z","updated_at":"2016-12-15T00:34:27Z","html_url":"https://github.com/SmartThingsCommunity/Documentation/pull/521#discussion_r92522184","pull_request_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521","_links":{"self":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/comments/92522184"},"html":{"href":"https://github.com/SmartThingsCommunity/Documentation/pull/521#discussion_r92522184"},"pull_request":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521"}}},"pull_request":{"url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521","id":97246053,"html_url":"https://github.com/SmartThingsCommunity/Documentation/pull/521","diff_url":"https://github.com/SmartThingsCommunity/Documentation/pull/521.diff","patch_url":"https://github.com/SmartThingsCommunity/Documentation/pull/521.patch","issue_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/521","number":521,"state":"open","locked":false,"title":"[DOCS-368] Cron schedule elaboration and other readability edits","user":{"login":"rajkaramchedu","id":22141615,"avatar_url":"https://avatars.githubusercontent.com/u/22141615?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkaramchedu","html_url":"https://github.com/rajkaramchedu","followers_url":"https://api.github.com/users/rajkaramchedu/followers","following_url":"https://api.github.com/users/rajkaramchedu/following{/other_user}","gists_url":"https://api.github.com/users/rajkaramchedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkaramchedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkaramchedu/subscriptions","organizations_url":"https://api.github.com/users/rajkaramchedu/orgs","repos_url":"https://api.github.com/users/rajkaramchedu/repos","events_url":"https://api.github.com/users/rajkaramchedu/events{/privacy}","received_events_url":"https://api.github.com/users/rajkaramchedu/received_events","type":"User","site_admin":false},"body":"Elaborated cron-specific sections highlighted in community here: https://community.smartthings.com/t/announcement-changes-coming-to-cron-jobs/41656/20\r\n\r\nAlso edited other sections of the document for better readability.\r\n@tslagle13 like to get your eyes on this, please. Thanks!","created_at":"2016-12-09T03:35:50Z","updated_at":"2016-12-15T00:34:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9131b7eeff8fd51c14f99b507aaab887a07d049","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521/commits","review_comments_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521/comments","review_comment_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/521/comments","statuses_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/statuses/2197b022c2201e9df586c429b5f11c28d4aec03c","head":{"label":"rajkaramchedu:cron-schedule-doc","ref":"cron-schedule-doc","sha":"2197b022c2201e9df586c429b5f11c28d4aec03c","user":{"login":"rajkaramchedu","id":22141615,"avatar_url":"https://avatars.githubusercontent.com/u/22141615?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkaramchedu","html_url":"https://github.com/rajkaramchedu","followers_url":"https://api.github.com/users/rajkaramchedu/followers","following_url":"https://api.github.com/users/rajkaramchedu/following{/other_user}","gists_url":"https://api.github.com/users/rajkaramchedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkaramchedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkaramchedu/subscriptions","organizations_url":"https://api.github.com/users/rajkaramchedu/orgs","repos_url":"https://api.github.com/users/rajkaramchedu/repos","events_url":"https://api.github.com/users/rajkaramchedu/events{/privacy}","received_events_url":"https://api.github.com/users/rajkaramchedu/received_events","type":"User","site_admin":false},"repo":{"id":69998272,"name":"Documentation","full_name":"rajkaramchedu/Documentation","owner":{"login":"rajkaramchedu","id":22141615,"avatar_url":"https://avatars.githubusercontent.com/u/22141615?v=3","gravatar_id":"","url":"https://api.github.com/users/rajkaramchedu","html_url":"https://github.com/rajkaramchedu","followers_url":"https://api.github.com/users/rajkaramchedu/followers","following_url":"https://api.github.com/users/rajkaramchedu/following{/other_user}","gists_url":"https://api.github.com/users/rajkaramchedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rajkaramchedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajkaramchedu/subscriptions","organizations_url":"https://api.github.com/users/rajkaramchedu/orgs","repos_url":"https://api.github.com/users/rajkaramchedu/repos","events_url":"https://api.github.com/users/rajkaramchedu/events{/privacy}","received_events_url":"https://api.github.com/users/rajkaramchedu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajkaramchedu/Documentation","description":"SmartThings Documentation","fork":true,"url":"https://api.github.com/repos/rajkaramchedu/Documentation","forks_url":"https://api.github.com/repos/rajkaramchedu/Documentation/forks","keys_url":"https://api.github.com/repos/rajkaramchedu/Documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajkaramchedu/Documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajkaramchedu/Documentation/teams","hooks_url":"https://api.github.com/repos/rajkaramchedu/Documentation/hooks","issue_events_url":"https://api.github.com/repos/rajkaramchedu/Documentation/issues/events{/number}","events_url":"https://api.github.com/repos/rajkaramchedu/Documentation/events","assignees_url":"https://api.github.com/repos/rajkaramchedu/Documentation/assignees{/user}","branches_url":"https://api.github.com/repos/rajkaramchedu/Documentation/branches{/branch}","tags_url":"https://api.github.com/repos/rajkaramchedu/Documentation/tags","blobs_url":"https://api.github.com/repos/rajkaramchedu/Documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajkaramchedu/Documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajkaramchedu/Documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajkaramchedu/Documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajkaramchedu/Documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/rajkaramchedu/Documentation/languages","stargazers_url":"https://api.github.com/repos/rajkaramchedu/Documentation/stargazers","contributors_url":"https://api.github.com/repos/rajkaramchedu/Documentation/contributors","subscribers_url":"https://api.github.com/repos/rajkaramchedu/Documentation/subscribers","subscription_url":"https://api.github.com/repos/rajkaramchedu/Documentation/subscription","commits_url":"https://api.github.com/repos/rajkaramchedu/Documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajkaramchedu/Documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajkaramchedu/Documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajkaramchedu/Documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajkaramchedu/Documentation/contents/{+path}","compare_url":"https://api.github.com/repos/rajkaramchedu/Documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajkaramchedu/Documentation/merges","archive_url":"https://api.github.com/repos/rajkaramchedu/Documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajkaramchedu/Documentation/downloads","issues_url":"https://api.github.com/repos/rajkaramchedu/Documentation/issues{/number}","pulls_url":"https://api.github.com/repos/rajkaramchedu/Documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/rajkaramchedu/Documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/rajkaramchedu/Documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajkaramchedu/Documentation/labels{/name}","releases_url":"https://api.github.com/repos/rajkaramchedu/Documentation/releases{/id}","deployments_url":"https://api.github.com/repos/rajkaramchedu/Documentation/deployments","created_at":"2016-10-04T19:21:35Z","updated_at":"2016-10-04T19:21:37Z","pushed_at":"2016-12-13T23:37:35Z","git_url":"git://github.com/rajkaramchedu/Documentation.git","ssh_url":"git@github.com:rajkaramchedu/Documentation.git","clone_url":"https://github.com/rajkaramchedu/Documentation.git","svn_url":"https://github.com/rajkaramchedu/Documentation","homepage":null,"size":22968,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"SmartThingsCommunity:master","ref":"master","sha":"384b0c596bd5463ba40581ea87eda37c711c3577","user":{"login":"SmartThingsCommunity","id":7317431,"avatar_url":"https://avatars.githubusercontent.com/u/7317431?v=3","gravatar_id":"","url":"https://api.github.com/users/SmartThingsCommunity","html_url":"https://github.com/SmartThingsCommunity","followers_url":"https://api.github.com/users/SmartThingsCommunity/followers","following_url":"https://api.github.com/users/SmartThingsCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SmartThingsCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SmartThingsCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmartThingsCommunity/subscriptions","organizations_url":"https://api.github.com/users/SmartThingsCommunity/orgs","repos_url":"https://api.github.com/users/SmartThingsCommunity/repos","events_url":"https://api.github.com/users/SmartThingsCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SmartThingsCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":19958585,"name":"Documentation","full_name":"SmartThingsCommunity/Documentation","owner":{"login":"SmartThingsCommunity","id":7317431,"avatar_url":"https://avatars.githubusercontent.com/u/7317431?v=3","gravatar_id":"","url":"https://api.github.com/users/SmartThingsCommunity","html_url":"https://github.com/SmartThingsCommunity","followers_url":"https://api.github.com/users/SmartThingsCommunity/followers","following_url":"https://api.github.com/users/SmartThingsCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SmartThingsCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SmartThingsCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmartThingsCommunity/subscriptions","organizations_url":"https://api.github.com/users/SmartThingsCommunity/orgs","repos_url":"https://api.github.com/users/SmartThingsCommunity/repos","events_url":"https://api.github.com/users/SmartThingsCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SmartThingsCommunity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SmartThingsCommunity/Documentation","description":"SmartThings Documentation","fork":false,"url":"https://api.github.com/repos/SmartThingsCommunity/Documentation","forks_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/forks","keys_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/teams","hooks_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/hooks","issue_events_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/events{/number}","events_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/events","assignees_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/assignees{/user}","branches_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/branches{/branch}","tags_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/tags","blobs_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/languages","stargazers_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/stargazers","contributors_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/contributors","subscribers_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/subscribers","subscription_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/subscription","commits_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/contents/{+path}","compare_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/merges","archive_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/downloads","issues_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues{/number}","pulls_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/labels{/name}","releases_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/releases{/id}","deployments_url":"https://api.github.com/repos/SmartThingsCommunity/Documentation/deployments","created_at":"2014-05-19T21:34:35Z","updated_at":"2016-12-09T06:42:19Z","pushed_at":"2016-12-13T23:37:35Z","git_url":"git://github.com/SmartThingsCommunity/Documentation.git","ssh_url":"git@github.com:SmartThingsCommunity/Documentation.git","clone_url":"https://github.com/SmartThingsCommunity/Documentation.git","svn_url":"https://github.com/SmartThingsCommunity/Documentation","homepage":null,"size":23115,"stargazers_count":88,"watchers_count":88,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":15,"forks":136,"open_issues":15,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521"},"html":{"href":"https://github.com/SmartThingsCommunity/Documentation/pull/521"},"issue":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/521"},"comments":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/issues/521/comments"},"review_comments":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521/comments"},"review_comment":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/pulls/521/commits"},"statuses":{"href":"https://api.github.com/repos/SmartThingsCommunity/Documentation/statuses/2197b022c2201e9df586c429b5f11c28d4aec03c"}}}}
{"actor":{"display_login":"charliek"}}