github.com/maier/nomad@v0.4.1-0.20161110003312-a9e3d0b8549d/website/source/docs/job-specification/periodic.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "periodic Stanza - Job Specification" 4 sidebar_current: "docs-job-specification-periodic" 5 description: |- 6 The "periodic" stanza allows a job to run at fixed times, dates, or intervals. 7 The easiest way to think about the periodic scheduler is "Nomad cron" or 8 "distributed cron". 9 --- 10 11 # `periodic` Stanza 12 13 <table class="table table-bordered table-striped"> 14 <tr> 15 <th width="120">Placement</th> 16 <td> 17 <code>job -> **periodic**</code> 18 </td> 19 </tr> 20 </table> 21 22 The `periodic` stanza allows a job to run at fixed times, dates, or intervals. 23 The easiest way to think about the periodic scheduler is "Nomad cron" or 24 "distributed cron". 25 26 ```hcl 27 job "docs" { 28 periodic { 29 cron = "*/15 * * * * *" 30 prohibit_overlap = true 31 } 32 } 33 ``` 34 35 The periodic expression is always evaluated in the **UTC timezone** to ensure 36 consistent evaluation when Nomad spans multiple time zones. 37 38 ## `periodic` Parameters 39 40 - `cron` `(string: <required>)` - Specifies a cron expression configuring the 41 interval to launch the job. In addition to [cron-specific formats][cron], this 42 option also includes predefined expressions such as `@daily` or `@weekly`. 43 44 - `prohibit_overlap` `(bool: false)` - Specifies if this job should wait until 45 previous instances of this job have completed. This only applies to this job; 46 it does not prevent other periodic jobs from running at the same time. 47 48 ## `periodic` Examples 49 50 The following examples only show the `periodic` stanzas. Remember that the 51 `periodic` stanza is only valid in the placements listed above. 52 53 ### Run Daily 54 55 This example shows running a periodic job daily: 56 57 ```hcl 58 periodic { 59 cron = "@daily" 60 } 61 ``` 62 63 [cron]: https://github.com/gorhill/cronexpr#implementation "List of cron expressions"