Update cron.md (#1625)

* Update cron.md

Add Crons operators and some examples

* Formatting

* Formatting

Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
Emad Poursina 2021-03-11 16:14:35 +03:30 committed by GitHub
parent 02fed04a43
commit 1acbf74350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 8 deletions

27
cron.md
View File

@ -30,16 +30,27 @@ Min Hour Day Mon Weekday
``` ```
{: .-setup.-box-chars} {: .-setup.-box-chars}
### Operators
| Operator | Description |
| --- | --- |
| `*` | all values |
| `,` | separate individual values |
| `-` | a range of values |
| `/` | divide a value into steps |
### Examples ### Examples
| Example | Description | | Example | Description |
| --- | --- | | --- | --- |
| `0 * * * *` | every hour | | `0 * * * *` | every hour |
| `*/15 * * * *` | every 15 mins | | `*/15 * * * *` | every 15 mins |
| `0 */2 * * *` | every 2 hours | | `0 */2 * * *` | every 2 hours |
| `0 0 * * 0` | every Sunday midnight | | `0 18 * * 0-6` | every week Mon-Sat at 6pm |
| --- | --- | | `10 2 * * 6,7` | every Sat and Thu on 2:10am |
| `@reboot` | every reboot | | `0 0 * * 0` | every Sunday midnight |
| --- | --- |
| `@reboot` | every reboot |
### Crontab ### Crontab