From 999db4cd0f6ee6a4c670e91a2b8c8a9c7ee79819 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 13 Jan 2016 10:47:22 -0800 Subject: [PATCH] Docs --- website/source/docs/http/periodic.html.md | 48 +++++++++++++++++++++++ website/source/docs/jobspec/index.html.md | 7 ++-- website/source/layouts/http.erb | 4 ++ 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 website/source/docs/http/periodic.html.md diff --git a/website/source/docs/http/periodic.html.md b/website/source/docs/http/periodic.html.md new file mode 100644 index 000000000..156df9331 --- /dev/null +++ b/website/source/docs/http/periodic.html.md @@ -0,0 +1,48 @@ +--- +layout: "http" +page_title: "HTTP API: /v1/periodic" +sidebar_current: "docs-http-periodic" +description: > + The '/v1/periodic' endpoint is used to interact with periodic jobs. +--- + +# /v1/periodic + +The `periodic` endpoint is used to interact with a single periodic job. By +default, the agent's local region is used; another region can be specified using +the `?region=` query parameter. + +## PUT / POST + +
+
Description
+
+ Forces a new instance of the periodic job. A new instance will be created + even if it violates the job's + [`prohibit_overlap`](/docs/jobspec/index.html#prohibit_overlap) settings. As + such, this should be only used to immediately run a periodic job. +
+ +
Method
+
PUT or POST
+ +
URL
+
`/v1/periodic//force`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + { + "EvalCreateIndex": 7, + "EvalID": "57983ddd-7fcf-3e3a-fd24-f699ccfb36f4" + } + ``` + +
+
diff --git a/website/source/docs/jobspec/index.html.md b/website/source/docs/jobspec/index.html.md index 0923d3255..139a00835 100644 --- a/website/source/docs/jobspec/index.html.md +++ b/website/source/docs/jobspec/index.html.md @@ -184,9 +184,10 @@ The `job` object supports the following keys: [here](https://github.com/gorhill/cronexpr#implementation) for full documentation of supported cron specs and the predefined expressions. - * `prohibit_overlap` - `prohibit_overlap` can be set to true to enforce that - the periodic job doesn't spawn a new instance of the job if any of the - previous jobs are still running. It is defaulted to false. + * `prohibit_overlap` - `prohibit_overlap` can + be set to true to enforce that the periodic job doesn't spawn a new + instance of the job if any of the previous jobs are still running. It is + defaulted to false. An example `periodic` block: diff --git a/website/source/layouts/http.erb b/website/source/layouts/http.erb index f22413041..a64893c17 100644 --- a/website/source/layouts/http.erb +++ b/website/source/layouts/http.erb @@ -97,6 +97,10 @@ Status + > + Periodic Jobs + + <% end %>