org.springframework.cloud.dataflow.shell.command

## Class TaskSchedulerCommands

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.command.TaskSchedulerCommands

- All Implemented Interfaces:
    org.springframework.shell.core.CommandMarker

      @Component
      public class TaskSchedulerCommands
      extends Object
      implements org.springframework.shell.core.CommandMarker

  Task Scheduler commands
  Author:
    Daniel Serleg

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskSchedulerCommands()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskSchedulerCommands

          public TaskSchedulerCommands()

  - ### Method Detail

    - #### availableWithCreateRole

          @CliAvailabilityIndicator(value="task schedule create")
          public boolean availableWithCreateRole()

    - #### availableWithListRole

          @CliAvailabilityIndicator(value="task schedule list")
          public boolean availableWithListRole()

    - #### availableWithUnscheduleRole

          @CliAvailabilityIndicator(value="task schedule destroy")
          public boolean availableWithUnscheduleRole()

    - #### create

          @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

      Throws:
        `IOException`

    - #### listByDefinition

          @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)

    - #### unschedule

          @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 © 2021 Pivotal Software, Inc.. All rights reserved.