Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix asterisk in cron table being rendered as list item #4836

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 101 additions & 19 deletions docs/concepts/schedules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,116 @@ Let's now look at how schedules can be defined through cron_expression_ or rate_

Cron Expression
---------------
Cron expression strings use :ref:`this <cron_expression_table>` syntax. They are validated at launch plan registration time.

.. _rate_unit:
Cron expression strings use the syntax shown below. They are validated at launch plan registration time.

Format
------

A cron expression represents a set of times, with the help of 5 space-separated fields.

.. _cron_expression_table:

+--------------+------------+-----------------+----------------------------+
| Field name | Mandatory? | Allowed values | Allowed special characters |
+==============+============+=================+============================+
| Minutes | Yes | 0-59 | * / , - |
+--------------+------------+-----------------+----------------------------+
| Hours | Yes | 0-23 | * / , - |
+--------------+------------+-----------------+----------------------------+
| Day of month | Yes | 1-31 | * / , - ? |
+--------------+------------+-----------------+----------------------------+
| Month | Yes | 1-12 or JAN-DEC | * / , - |
+--------------+------------+-----------------+----------------------------+
| Day of week | Yes | 0-6 or SUN-SAT | * / , - ? |
+--------------+------------+-----------------+----------------------------+
.. raw:: html

<table id="cron_expression_table" class="docutils align-default">
<colgroup>
<col style="width: 20%">
<col style="width: 17%">
<col style="width: 24%">
<col style="width: 39%">
</colgroup>
<thead>
<tr class="row-odd">
<th class="head">
<p>Field name</p>
</th>
<th class="head">
<p>Required</p>
</th>
<th class="head">
<p>Allowed values</p>
</th>
<th class="head">
<p>Allowed special characters</p>
</th>
</tr>
</thead>
<tbody>
<tr class="row-even">
<td>
<p>Minutes</p>
</td>
<td>
<p>Yes</p>
</td>
<td>
<p>0-59</p>
</td>
<td>
<p>* / , -</p>
</td>
</tr>
<tr class="row-odd">
<td><p>Hours</p></td>
<td>
<p>Yes</p>
</td>
<td>
<p>0-23</p>
</td>
<td>
<p>* / , -</p>
</td>
</tr>
<tr class="row-even">
<td>
<p>Day of month</p>
</td>
<td>
<p>Yes</p>
</td>
<td>
<p>1-31</p><
</td>
<td>
<p>/ , - ?</p>
</td>
</tr>
<tr class="row-odd">
<td>
<p>Month</p>
</td>
<td>
<p>Yes</p>
</td>
<td>
<p>1-12 or JAN-DEC</p>
</td>
<td>
<p>* / , -</p>
</td>
</tr>
<tr class="row-even">
<td>
<p>Day of week</p>
</td>
<td>
<p>Yes</p>
</td>
<td>
<p>0-6 or SUN-SAT</p>
</td>
<td>
<p>* / , - ?</p>
</td>
</tr>
</tbody>
</table>

**Note**: The 'Month' and 'Day of week' fields are case insensitive.


Cron schedules
--------------
An incorrect cron schedule expression leads to a failure in triggering the schedule. :ref:`Here <cron_expression_table>` is a table that shows the format of a cron expression.
An incorrect cron schedule expression leads to a failure in triggering the schedule. :ref:`Here <cron_expression>` is a table that shows the format of a cron expression.

Below is another example:

Expand All @@ -73,6 +152,8 @@ Below is another example:
)


.. _fixed_rate:

Fixed rate schedules
----------------------
Instead of cron schedules, fixed rate schedules can be used.
Expand All @@ -95,6 +176,7 @@ Below is an example with duration in `days`.

)

.. _rate_unit:

Rate Unit
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is outside the scope of this PR, but I don't understand the difference between this section and the "Fixed rate schedules" section above.

---------
Expand Down
Loading