@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,
File propertiesFile,
String arguments,
String platform) |
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 (comma separated string eg.: --properties \'prop.first=prop,prop.sec=prop2\'") String properties, @CliOption(key="propertiesFile",help="the properties for this deployment (as a File)") File propertiesFile, @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) throws IOException
IOException
@CliCommand(value="task schedule list", help="List task schedules by task definition name") public 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)
@CliCommand(value="task schedule destroy", help="Delete task schedule") public String unschedule(@CliOption(mandatory=true,key="name",help="The name of the task schedule") String name, @CliOption(key="platform",help="the name platform from which to unschedule") String platform)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.