Set the task time out / End task after x minutes
search cancel

Set the task time out / End task after x minutes

book

Article ID: 178418

calendar_today

Updated On:

Products

IT Management Suite Task Server

Issue/Introduction

How can the task time out period / End task after x minutes option be changed?

Environment

ITMS 8.x

Resolution

This option will vary from task type to task type.  For example on a run script task this option can be changed in the advanced task options.  Inventory task types do not expose this option and is not available through the GUI.  Whether this option is available through the GUI or not is completely depended on the solution developers.  If it is not available it could be for a good reason.  However, there is still a way to change this option if it is not available through the GUI while editing the task.  To do this it must be done through modifying the task xml

To modify the task xml follow these steps:

  1. Right click the task and select export.  Save the task to your desktop
  2. Open the task .xml file in an editor (wordpad/notepad)
  3. Find the highest version of the task. The highest number is specified by the versions count="x" syntax
    </itemLocalizations>
      <versions count="3">
  4. Go to the highest version.  You can usually search for number="x"
    <version guid="33907f06-5777-4f4e-ae09-3c69723a0f8a" number="3">
  5. There will be a <state> field before the next </version> in there find kill enforce= and set it to True and maxMinutes= to the time out you would like
    <kill enforce="True" maxMinutes="45" />
  6. Next find last instance of kill enforce= (note that it should not be under a specific version).  Set the values for kill enforce=true and the maxMinutes you specified in step 5.
  7. Save the .xml file
  8. Go back to the NS console and import the task

Below is an example of changing the timeout from 41 minutes to 59 minutes on a runscript task .xml file.  Note that changing previous versions does not matter and that kill enforce is already set to True.

Before:
<item guid="{6b9304f0-da7d-4e37-b8e9-4024c0d372e4}" classGuid="{4f1b9b32-b5c6-4d83-8992-f73582217aac}">
  <!--  Type: Altiris.TaskServerTasks.ScriptTask.ScriptTask  -->
  <!--  Assembly: Altiris.TaskServerTasks, Version=7.0.4044.0, Culture=neutral, PublicKeyToken=99b1e4cc0d03f223  -->
  <name>Dir / Pause</name>
  <alias />
  <productGuid>{d1341aa4-95d3-4335-ad2f-a7f3389783b6}</productGuid>
  <itemAttributes>Normal</itemAttributes>
  <itemLocalizations>
    <culture name="">
      <description>Executes a script on one or more remote computers</description>
      <name>Dir / Pause</name>
    </culture>
    <culture name="en">
      <description>Executes a script on one or more remote computers</description>
    </culture>
  </itemLocalizations>
  <versions count="3">
    <version guid="a3a34b77-b9d5-43fa-ba2a-042ac2109bdd" number="2">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830977234530000</modifiedDate>
      <name>Dir / Pause</name>
      <description />
      <state><vItem><requiredPermissions><permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" /></requiredPermissions><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="34" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
    <version guid="33907f06-5777-4f4e-ae09-3c69723a0f8a" number="3">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830979501270000</modifiedDate>
      <name />
      <description />
      <state><vItem><requiredPermissions><permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" /></requiredPermissions><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="41" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause
dir</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
    <version guid="af0d8a15-3713-4ac8-83ba-eb85a02d6767" number="1">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830977233770000</modifiedDate>
      <name>Dir / Pause</name>
      <description />
      <state><vItem><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="34" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
  </versions>
  <originNS guid="{b15e5977-52b5-4424-9def-a738faa6e4d1}" name="[ComputerName]" url="http://[ComputerName]/Altiris/NS/" />
  <requiredPermissions>
    <permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" />
  </requiredPermissions>
  <baseClientTask />
  <remoteExecAdvanced>
    <priority value="Normal" compatibility="Exclusive" />
    <kill enforce="True" maxMinutes="41" />
    <platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" />
  </remoteExecAdvanced>
  <scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause
dir</scriptText>
  <scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" />
  <parentFolderGuid>455ae0db-ec74-455b-b262-89421c96908d</parentFolderGuid>
  <sourceNS guid="{b15e5977-52b5-4424-9def-a738faa6e4d1}" name="[ComputerName]" url="http://[ComputerName]/Altiris/NS/" />
  <security owner="@APPLICATION_ID" inherit="True">
    <aces>
      <ace type="reserved" name="@APPLICATION_ID">
        <permissionGrants>
          <permissionGrant guid="{eca6254f-5017-4730-9b3f-5add230829b7}" name="Delete" />
          <permissionGrant guid="{983a2d22-7a82-4db0-a707-52c7d6b1441e}" name="Read" />
          <permissionGrant guid="{ac296df1-eb40-4592-899f-25d5c07d45f6}" name="Write" />
          <permissionGrant guid="{fbce1052-3bcf-4734-9701-d5bdb08fe64c}" name="Run" />
          <permissionGrant guid="{819dae1e-b1a5-4643-81a1-26ef95feb8a8}" name="Change Permissions" />
          <permissionGrant guid="{726b1c09-7108-450d-ae24-5f8e93135ed6}" name="Clone" />
          <permissionGrant guid="{4ddc04c3-f0a5-4e88-84aa-c44c8c5ebcc4}" name="Read Permissions" />
        </permissionGrants>
      </ace>
    </aces>
  </security>
  <itemReferences>
    <itemReference guid="{c6c14a32-2dd0-458c-9300-ab24e8d016fd}" hint="tasktotype" type="RelatedChild" />
  </itemReferences>
</item>

After:
<item guid="{6b9304f0-da7d-4e37-b8e9-4024c0d372e4}" classGuid="{4f1b9b32-b5c6-4d83-8992-f73582217aac}">
  <!--  Type: Altiris.TaskServerTasks.ScriptTask.ScriptTask  -->
  <!--  Assembly: Altiris.TaskServerTasks, Version=7.0.4044.0, Culture=neutral, PublicKeyToken=99b1e4cc0d03f223  -->
  <name>Dir / Pause</name>
  <alias />
  <productGuid>{d1341aa4-95d3-4335-ad2f-a7f3389783b6}</productGuid>
  <itemAttributes>Normal</itemAttributes>
  <itemLocalizations>
    <culture name="">
      <description>Executes a script on one or more remote computers</description>
      <name>Dir / Pause</name>
    </culture>
    <culture name="en">
      <description>Executes a script on one or more remote computers</description>
    </culture>
  </itemLocalizations>
  <versions count="3">
    <version guid="a3a34b77-b9d5-43fa-ba2a-042ac2109bdd" number="2">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830977234530000</modifiedDate>
      <name>Dir / Pause</name>
      <description />
      <state><vItem><requiredPermissions><permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" /></requiredPermissions><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="34" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
    <version guid="33907f06-5777-4f4e-ae09-3c69723a0f8a" number="3">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830979501270000</modifiedDate>
      <name />
      <description />
      <state><vItem><requiredPermissions><permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" /></requiredPermissions><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="59" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause
dir</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
    <version guid="af0d8a15-3713-4ac8-83ba-eb85a02d6767" number="1">
      <modifiedBy>[ComputerName]\Administrator</modifiedBy>
      <modifiedDate>633830977233770000</modifiedDate>
      <name>Dir / Pause</name>
      <description />
      <state><vItem><baseClientTask /><remoteExecAdvanced><priority value="Normal" compatibility="Exclusive" /><kill enforce="True" maxMinutes="34" /><platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" /></remoteExecAdvanced><scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause</scriptText><scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" /></vItem></state>
    </version>
  </versions>
  <originNS guid="{b15e5977-52b5-4424-9def-a738faa6e4d1}" name="[ComputerName]" url="http://[ComputerName]/Altiris/NS/" />
  <requiredPermissions>
    <permission guid="7a8ca359-02fe-465c-9bd5-66cb373d3950" />
  </requiredPermissions>
  <baseClientTask />
  <remoteExecAdvanced>
    <priority value="Normal" compatibility="Exclusive" />
    <kill enforce="True" maxMinutes="59" />
    <platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" />
  </remoteExecAdvanced>
  <scriptText typeGuid="ed6e3086-8918-4a4a-92b7-dc0772780df3">dir
pause
dir</scriptText>
  <scriptAdvanced collectOutput="False" runAs="Default" username="" window="ShowNormal" launch64bitProcess="False" />
  <parentFolderGuid>455ae0db-ec74-455b-b262-89421c96908d</parentFolderGuid>
  <sourceNS guid="{b15e5977-52b5-4424-9def-a738faa6e4d1}" name="[ComputerName]" url="http://[ComputerName]/Altiris/NS/" />
  <security owner="@APPLICATION_ID" inherit="True">
    <aces>
      <ace type="reserved" name="@APPLICATION_ID">
        <permissionGrants>
          <permissionGrant guid="{eca6254f-5017-4730-9b3f-5add230829b7}" name="Delete" />
          <permissionGrant guid="{983a2d22-7a82-4db0-a707-52c7d6b1441e}" name="Read" />
          <permissionGrant guid="{ac296df1-eb40-4592-899f-25d5c07d45f6}" name="Write" />
          <permissionGrant guid="{fbce1052-3bcf-4734-9701-d5bdb08fe64c}" name="Run" />
          <permissionGrant guid="{819dae1e-b1a5-4643-81a1-26ef95feb8a8}" name="Change Permissions" />
          <permissionGrant guid="{726b1c09-7108-450d-ae24-5f8e93135ed6}" name="Clone" />
          <permissionGrant guid="{4ddc04c3-f0a5-4e88-84aa-c44c8c5ebcc4}" name="Read Permissions" />
        </permissionGrants>
      </ace>
    </aces>
  </security>
  <itemReferences>
    <itemReference guid="{c6c14a32-2dd0-458c-9300-ab24e8d016fd}" hint="tasktotype" type="RelatedChild" />
  </itemReferences>
</item>