diff --git a/docs/cli-reference/ark_create_schedule.md b/docs/cli-reference/ark_create_schedule.md index 470d4032e..4ddb7b575 100644 --- a/docs/cli-reference/ark_create_schedule.md +++ b/docs/cli-reference/ark_create_schedule.md @@ -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 [flags] +ark create schedule NAME --schedule [flags] +``` + +### Examples + +``` +ark create schedule NAME --schedule="0 */6 * * *" ``` ### Options diff --git a/docs/cli-reference/ark_schedule_create.md b/docs/cli-reference/ark_schedule_create.md index 9bfc09840..c60c91a0d 100644 --- a/docs/cli-reference/ark_schedule_create.md +++ b/docs/cli-reference/ark_schedule_create.md @@ -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 [flags] +ark schedule create NAME --schedule [flags] +``` + +### Examples + +``` +ark create schedule NAME --schedule="0 */6 * * *" ``` ### Options diff --git a/pkg/cmd/cli/schedule/create.go b/pkg/cmd/cli/schedule/create.go index 3de434307..9d915a391 100644 --- a/pkg/cmd/cli/schedule/create.go +++ b/pkg/cmd/cli/schedule/create.go @@ -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))