Skip to content

Commit

Permalink
Merge pull request #331 from lypht/schedule
Browse files Browse the repository at this point in the history
Include cron examples for schedule creation
  • Loading branch information
skriss committed Feb 28, 2018
2 parents 52641e8 + f733869 commit 975dce9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
18 changes: 16 additions & 2 deletions docs/cli-reference/ark_create_schedule.md
Expand Up @@ -5,10 +5,24 @@ Create a schedule
### Synopsis


Create a schedule
The --schedule flag is required, in cron notation:

| Character Position | Character Period | Acceptable Values |
| -------------------|:----------------:| -----------------:|
| 1 | Minute | 0-59,* |
| 2 | Hour | 0-23,* |
| 3 | Day of Month | 1-31,* |
| 4 | Month | 1-12,* |
| 5 | Day of Week | 0-7,* |

```
ark create schedule NAME --schedule [flags]
```

### Examples

```
ark create schedule NAME [flags]
ark create schedule NAME --schedule="0 */6 * * *"
```

### Options
Expand Down
18 changes: 16 additions & 2 deletions docs/cli-reference/ark_schedule_create.md
Expand Up @@ -5,10 +5,24 @@ Create a schedule
### Synopsis


Create a schedule
The --schedule flag is required, in cron notation:

| Character Position | Character Period | Acceptable Values |
| -------------------|:----------------:| -----------------:|
| 1 | Minute | 0-59,* |
| 2 | Hour | 0-23,* |
| 3 | Day of Month | 1-31,* |
| 4 | Month | 1-12,* |
| 5 | Day of Week | 0-7,* |

```
ark schedule create NAME --schedule [flags]
```

### Examples

```
ark schedule create NAME [flags]
ark create schedule NAME --schedule="0 */6 * * *"
```

### Options
Expand Down
14 changes: 13 additions & 1 deletion pkg/cmd/cli/schedule/create.go
Expand Up @@ -36,8 +36,20 @@ func NewCreateCommand(f client.Factory, use string) *cobra.Command {
o := NewCreateOptions()

c := &cobra.Command{
Use: use + " NAME",
Use: use + " NAME --schedule",
Short: "Create a schedule",
Long: `The --schedule flag is required, in cron notation:
| Character Position | Character Period | Acceptable Values |
| -------------------|:----------------:| -----------------:|
| 1 | Minute | 0-59,* |
| 2 | Hour | 0-23,* |
| 3 | Day of Month | 1-31,* |
| 4 | Month | 1-12,* |
| 5 | Day of Week | 0-7,* |`,

Example: `ark create schedule NAME --schedule="0 */6 * * *"`,

Run: func(c *cobra.Command, args []string) {
cmd.CheckError(o.Validate(c, args))
cmd.CheckError(o.Complete(args))
Expand Down

0 comments on commit 975dce9

Please sign in to comment.