{"action":"created","comment":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/86078512","pull_request_review_id":6754260,"id":86078512,"diff_hunk":"@@ -489,7 +490,22 @@ public static CronExpression parseCronExpression(String cronExpression, DateTime\n     } else return null;\n   }\n \n-  public static boolean isCronExpressionValid(String cronExpression) {\n-    return CronExpression.isValidExpression(cronExpression);\n+  /**\n+   *\n+   * @param cronExpression\n+   * @param timezone\n+   * @return if the cronExpression is valid or not.\n+   */\n+  public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) {\n+    if (!CronExpression.isValidExpression(cronExpression)) {\n+      return false;\n+    } else {\n+      CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone);\n+      if (cronExecutionTime == null || cronExecutionTime.getNextValidTimeAfter(new Date()) == null) {","path":"azkaban-common/src/main/java/azkaban/utils/Utils.java","position":25,"original_position":25,"commit_id":"e4571768afcbf4a16748c62ce31f25bab7ebcc83","original_commit_id":"e4571768afcbf4a16748c62ce31f25bab7ebcc83","user":{"login":"fsi206914","id":2895882,"avatar_url":"https://avatars.githubusercontent.com/u/2895882?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi206914","html_url":"https://github.com/fsi206914","followers_url":"https://api.github.com/users/fsi206914/followers","following_url":"https://api.github.com/users/fsi206914/following{/other_user}","gists_url":"https://api.github.com/users/fsi206914/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi206914/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi206914/subscriptions","organizations_url":"https://api.github.com/users/fsi206914/orgs","repos_url":"https://api.github.com/users/fsi206914/repos","events_url":"https://api.github.com/users/fsi206914/events{/privacy}","received_events_url":"https://api.github.com/users/fsi206914/received_events","type":"User","site_admin":false},"body":"Good suggestion. Incorporated.","created_at":"2016-11-02T06:13:19Z","updated_at":"2016-11-02T06:13:19Z","html_url":"https://github.com/azkaban/azkaban/pull/789#discussion_r86078512","pull_request_url":"https://api.github.com/repos/azkaban/azkaban/pulls/789","_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/86078512"},"html":{"href":"https://github.com/azkaban/azkaban/pull/789#discussion_r86078512"},"pull_request":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/789"}}},"pull_request":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/789","id":91823688,"html_url":"https://github.com/azkaban/azkaban/pull/789","diff_url":"https://github.com/azkaban/azkaban/pull/789.diff","patch_url":"https://github.com/azkaban/azkaban/pull/789.patch","issue_url":"https://api.github.com/repos/azkaban/azkaban/issues/789","number":789,"state":"open","locked":false,"title":"Fix cron expression validation","user":{"login":"fsi206914","id":2895882,"avatar_url":"https://avatars.githubusercontent.com/u/2895882?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi206914","html_url":"https://github.com/fsi206914","followers_url":"https://api.github.com/users/fsi206914/followers","following_url":"https://api.github.com/users/fsi206914/following{/other_user}","gists_url":"https://api.github.com/users/fsi206914/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi206914/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi206914/subscriptions","organizations_url":"https://api.github.com/users/fsi206914/orgs","repos_url":"https://api.github.com/users/fsi206914/repos","events_url":"https://api.github.com/users/fsi206914/events{/privacy}","received_events_url":"https://api.github.com/users/fsi206914/received_events","type":"User","site_admin":false},"body":"Currently The Verifying capability of CronExpression is not sufficient. During this pull request, I further check validity of a cron expression by obtaining the next available time of cron.\r\n\r\nUnite Test is added.\r\n\r\nVerified through local environment as well.","created_at":"2016-11-01T17:11:53Z","updated_at":"2016-11-02T06:13:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e3ea9c5833a0b4117aded36a0bb18f4f2aee9c9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/azkaban/azkaban/pulls/789/commits","review_comments_url":"https://api.github.com/repos/azkaban/azkaban/pulls/789/comments","review_comment_url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azkaban/azkaban/issues/789/comments","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/e4571768afcbf4a16748c62ce31f25bab7ebcc83","head":{"label":"fsi206914:FixCronExpressionValidation","ref":"FixCronExpressionValidation","sha":"e4571768afcbf4a16748c62ce31f25bab7ebcc83","user":{"login":"fsi206914","id":2895882,"avatar_url":"https://avatars.githubusercontent.com/u/2895882?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi206914","html_url":"https://github.com/fsi206914","followers_url":"https://api.github.com/users/fsi206914/followers","following_url":"https://api.github.com/users/fsi206914/following{/other_user}","gists_url":"https://api.github.com/users/fsi206914/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi206914/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi206914/subscriptions","organizations_url":"https://api.github.com/users/fsi206914/orgs","repos_url":"https://api.github.com/users/fsi206914/repos","events_url":"https://api.github.com/users/fsi206914/events{/privacy}","received_events_url":"https://api.github.com/users/fsi206914/received_events","type":"User","site_admin":false},"repo":{"id":61070884,"name":"azkaban","full_name":"fsi206914/azkaban","owner":{"login":"fsi206914","id":2895882,"avatar_url":"https://avatars.githubusercontent.com/u/2895882?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi206914","html_url":"https://github.com/fsi206914","followers_url":"https://api.github.com/users/fsi206914/followers","following_url":"https://api.github.com/users/fsi206914/following{/other_user}","gists_url":"https://api.github.com/users/fsi206914/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi206914/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi206914/subscriptions","organizations_url":"https://api.github.com/users/fsi206914/orgs","repos_url":"https://api.github.com/users/fsi206914/repos","events_url":"https://api.github.com/users/fsi206914/events{/privacy}","received_events_url":"https://api.github.com/users/fsi206914/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fsi206914/azkaban","description":"Azkaban workflow manager.","fork":true,"url":"https://api.github.com/repos/fsi206914/azkaban","forks_url":"https://api.github.com/repos/fsi206914/azkaban/forks","keys_url":"https://api.github.com/repos/fsi206914/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsi206914/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsi206914/azkaban/teams","hooks_url":"https://api.github.com/repos/fsi206914/azkaban/hooks","issue_events_url":"https://api.github.com/repos/fsi206914/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/fsi206914/azkaban/events","assignees_url":"https://api.github.com/repos/fsi206914/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/fsi206914/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/fsi206914/azkaban/tags","blobs_url":"https://api.github.com/repos/fsi206914/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsi206914/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsi206914/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsi206914/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsi206914/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/fsi206914/azkaban/languages","stargazers_url":"https://api.github.com/repos/fsi206914/azkaban/stargazers","contributors_url":"https://api.github.com/repos/fsi206914/azkaban/contributors","subscribers_url":"https://api.github.com/repos/fsi206914/azkaban/subscribers","subscription_url":"https://api.github.com/repos/fsi206914/azkaban/subscription","commits_url":"https://api.github.com/repos/fsi206914/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsi206914/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsi206914/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsi206914/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsi206914/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/fsi206914/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsi206914/azkaban/merges","archive_url":"https://api.github.com/repos/fsi206914/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsi206914/azkaban/downloads","issues_url":"https://api.github.com/repos/fsi206914/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/fsi206914/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/fsi206914/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/fsi206914/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsi206914/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/fsi206914/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/fsi206914/azkaban/deployments","created_at":"2016-06-13T21:26:53Z","updated_at":"2016-06-13T21:26:58Z","pushed_at":"2016-11-01T17:07:59Z","git_url":"git://github.com/fsi206914/azkaban.git","ssh_url":"git@github.com:fsi206914/azkaban.git","clone_url":"https://github.com/fsi206914/azkaban.git","svn_url":"https://github.com/fsi206914/azkaban","homepage":"https://azkaban.github.io","size":33385,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"azkaban:master","ref":"master","sha":"8997a032668b13082ac66b4a04be7995cfbedd79","user":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"repo":{"id":6271421,"name":"azkaban","full_name":"azkaban/azkaban","owner":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azkaban/azkaban","description":"Azkaban workflow manager.","fork":false,"url":"https://api.github.com/repos/azkaban/azkaban","forks_url":"https://api.github.com/repos/azkaban/azkaban/forks","keys_url":"https://api.github.com/repos/azkaban/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azkaban/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azkaban/azkaban/teams","hooks_url":"https://api.github.com/repos/azkaban/azkaban/hooks","issue_events_url":"https://api.github.com/repos/azkaban/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/azkaban/azkaban/events","assignees_url":"https://api.github.com/repos/azkaban/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/azkaban/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/azkaban/azkaban/tags","blobs_url":"https://api.github.com/repos/azkaban/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azkaban/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azkaban/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/azkaban/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/azkaban/azkaban/languages","stargazers_url":"https://api.github.com/repos/azkaban/azkaban/stargazers","contributors_url":"https://api.github.com/repos/azkaban/azkaban/contributors","subscribers_url":"https://api.github.com/repos/azkaban/azkaban/subscribers","subscription_url":"https://api.github.com/repos/azkaban/azkaban/subscription","commits_url":"https://api.github.com/repos/azkaban/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/azkaban/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/azkaban/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/azkaban/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/azkaban/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/azkaban/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azkaban/azkaban/merges","archive_url":"https://api.github.com/repos/azkaban/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azkaban/azkaban/downloads","issues_url":"https://api.github.com/repos/azkaban/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/azkaban/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/azkaban/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/azkaban/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azkaban/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/azkaban/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/azkaban/azkaban/deployments","created_at":"2012-10-18T01:34:53Z","updated_at":"2016-11-02T06:01:21Z","pushed_at":"2016-11-01T17:11:53Z","git_url":"git://github.com/azkaban/azkaban.git","ssh_url":"git@github.com:azkaban/azkaban.git","clone_url":"https://github.com/azkaban/azkaban.git","svn_url":"https://github.com/azkaban/azkaban","homepage":"https://azkaban.github.io","size":34666,"stargazers_count":841,"watchers_count":841,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":473,"mirror_url":null,"open_issues_count":272,"forks":473,"open_issues":272,"watchers":841,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/789"},"html":{"href":"https://github.com/azkaban/azkaban/pull/789"},"issue":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/789"},"comments":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/789/comments"},"review_comments":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/789/comments"},"review_comment":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/789/commits"},"statuses":{"href":"https://api.github.com/repos/azkaban/azkaban/statuses/e4571768afcbf4a16748c62ce31f25bab7ebcc83"}}}}
{"actor":{"display_login":"fsi206914"}}