Class ScheduledTask

java.lang.Object
org.netxms.client.ScheduledTask

public class ScheduledTask extends Object
  • Field Details

  • Constructor Details

    • ScheduledTask

      public ScheduledTask()
      Create empty task object
    • ScheduledTask

      public ScheduledTask(NXCPMessage msg, long base)
      Create task object from NXCP message
      Parameters:
      msg - NXCP message
      base - base field ID
    • ScheduledTask

      public ScheduledTask(String taskHandlerId, String schedule, String parameters, String comments, Date executionTime, int flags, long objectId)
      Create new scheduled task object
      Parameters:
      taskHandlerId - scheduled task handler ID
      schedule - schedule for recurrent task
      parameters - handler-specific parameters
      comments - task comments
      executionTime - execution time for "run once" tasks
      flags - task flags
      objectId - ID of NetXMS object associated with this task
  • Method Details

    • fillMessage

      public void fillMessage(NXCPMessage msg)
      Fill NXCP message with task data
      Parameters:
      msg - NXCP message
    • getId

      public long getId()
      Returns:
      the id
    • setId

      public void setId(long id)
      Parameters:
      id - the id to set
    • getTaskHandlerId

      public String getTaskHandlerId()
      Get ID of scheduled task handler.
      Returns:
      scheduled task handler ID
    • setTaskHandlerId

      public void setTaskHandlerId(String taskHandlerId)
      Set ID of scheduled task handler.
      Parameters:
      taskHandlerId - new scheduled task handler ID
    • getSchedule

      public String getSchedule()
      Get recurring task schedule
      Returns:
      recurring task schedule
    • setSchedule

      public void setSchedule(String schedule)
      Set recurring task schedule
      Parameters:
      schedule - new recurring task schedule
    • getParameters

      public String getParameters()
      Returns:
      the parameters
    • setParameters

      public void setParameters(String parameters)
      Parameters:
      parameters - the parameters to set
    • getExecutionTime

      public Date getExecutionTime()
      Returns:
      the executionTime
    • setExecutionTime

      public void setExecutionTime(Date executionTime)
      Parameters:
      executionTime - the executionTime to set
    • getLastExecutionTime

      public Date getLastExecutionTime()
      Returns:
      the lastExecutionTime
    • setLastExecutionTime

      public void setLastExecutionTime(Date lastExecutionTime)
      Parameters:
      lastExecutionTime - the lastExecutionTime to set
    • getFlags

      public int getFlags()
      Returns:
      the flags
    • setFlags

      public void setFlags(int flags)
      Parameters:
      flags - the flags to set
    • getOwner

      public int getOwner()
      Returns:
      the owner
    • setOwner

      public void setOwner(int owner)
      Parameters:
      owner - the owner to set
    • getObjectId

      public long getObjectId()
      Returns:
      the objectId
    • setObjectId

      public void setObjectId(long objectId)
      Parameters:
      objectId - the objectId to set
    • getKey

      public String getKey()
      Get task key
      Returns:
      task key
    • setKey

      public void setKey(String key)
      Set task key
      Parameters:
      key - new task key
    • getStatus

      public String getStatus()
      Get task status
      Returns:
      task status
    • getComments

      public String getComments()
      Get task comments
      Returns:
      comments
    • setComments

      public void setComments(String comments)
      Set scheduled task comments
      Parameters:
      comments - The comments to set
    • isSystem

      public boolean isSystem()
      Check if this task is a system task
      Returns:
      true if this task is a system task
    • isCompleted

      public boolean isCompleted()
      Check if this task has completed execution
      Returns:
      true if this task has completed execution
    • isDisabled

      public boolean isDisabled()
      Check if this task is disabled
      Returns:
      true if this task is disabled
    • isRecurring

      public boolean isRecurring()
      Check if this task is configured for recurring execution
      Returns:
      true if this task is configured for recurring execution
    • setEnabed

      public void setEnabed(boolean enabled)
      Enable/disable task
      Parameters:
      enabled - true if task should be enabled