@Component public class TaskSchedulerCommands extends Object implements org.springframework.shell.core.CommandMarker
| Constructor and Description |
|---|
TaskSchedulerCommands() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
availableWithCreateRole() |
boolean |
availableWithListRole() |
boolean |
availableWithUnscheduleRole() |
String |
create(String name,
String definitionName,
String expression,
String properties,
String arguments,
String platform) |
org.springframework.shell.table.Table |
listByDefinition(String platform,
String definitionName) |
String |
unschedule(String name,
String platform) |
@CliAvailabilityIndicator(value="task schedule create") public boolean availableWithCreateRole()
@CliAvailabilityIndicator(value="task schedule list") public boolean availableWithListRole()
@CliAvailabilityIndicator(value="task schedule destroy") public boolean availableWithUnscheduleRole()
@CliCommand(value="task schedule create",
help="Create new task schedule")
public String create(@CliOption(mandatory=true,key="name",help="the name to give to the schedule")
String name,
@CliOption(mandatory=true,key="definitionName",help="a task definition name")
String definitionName,
@CliOption(mandatory=true,key="expression",help="the cron expression of the schedule")
String expression,
@CliOption(key="properties",help="a task properties (coma separated string eg.: --properties \'prop.first=prop,prop.sec=prop2\'")
String properties,
@CliOption(key="arguments",help="command line args (space separated string eg.: --arguments \'a b c d\'")
String arguments,
@CliOption(key="platform",help="the name of the platform from which to create the schedule")
String platform)
@CliCommand(value="task schedule list",
help="List task schedules by task definition name")
public org.springframework.shell.table.Table listByDefinition(@CliOption(key="platform",help="the name platform from which to retrieve a list of schedules")
String platform,
@CliOption(key="definitionName",help="the task definition name")
String definitionName)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.