Quantcast
Viewing all articles
Browse latest Browse all 1056

Sending custom task statuses with SendTaskStatus.exe

Image may be NSFW.
Clik here to view.
landesk.png

 

 

 

Purpose

 

 

In some special cases it is necessary to send up custom messages to the console during a deployment task. In LDMS 9.6 SP1 and later this is not as common as we have implemented task stages so you can see if the task is in the Core Initiated, Downloading, Installing, or Completed states. For large deployment packages that are scripted it is helpful still to send a status up to the core detailing what step the task is on. Previously this was possible by using the following command in your script.

"%LDMS_LOCAL_DIR%\..\SDClient.exe" /taskid=%task_id% /msg="Any Message"


However, this method is being deprecated and replaced with SendTaskStatus.exe which is a more capable process dedicated specifically to sending a task status for any type of task to the core server.

 

 

Description

 

 

Here are the command line options for SendTaskStatus.exe. The required parameters are "-core", "-taskId", and "-retcode" all other are optional.

 

Command line syntax:

sendtaskstatus.exe -core=<core> -taskId=<taskId> -retcode=<return code> -message="message"

 

Arguments:

 

  • -core
    • Name of the Core Server
  • -coreandip
    • The IP Address of the core server, or the name:IP address of the core server.
  • -taskId
    • ID for which the return code is to be updated. You can use the %task_id% variable for this parameter to avoid having to set the task ID manually in each script every time they are scheduled.
  • -return code
    • Current return code for the task. If using a BAT script and you'd like to pass up the return code for the most recent action in the script you can use the %errorlevel% variable.


Optional Arguments:


  • -complete
    • When specified the task is treated as being completed and will be moved to either the Successful or Failed status buckets in the task depending on the return code.
  • -message
    • A custom message to be displayed in the scheduled task message column in the console.
  • -ldap
    • LDAP information to be reported with the status.
  • -log=<file>
    • Path to a log file which will be reported.
  • -pkgId=<id>
    • Software distribution tasks use the package id to update a set of tasks that all target the same package.

 

Example Command of a simple task message update used in a BAT script:

"%LDMS_LOCAL_DIR%\..\SendTaskStatus.exe" -core=mycore.landesk.com -taskid=%task_ID% -retcode=%errorlevel% -message="Configuring System"

 

 

Affected Products

 


LANDESK Management Suite 9.5 and 9.6

 



Viewing all articles
Browse latest Browse all 1056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>