none
Scheduled Jobs

    Question

  • Dear All,

    I need to be able to run scheduled jobs in Service Manager like Check alerts, check server rooms, etc. This is defined as IT Operations Management Activities in ITIL v.3

    Thank you,

    ViktoriaM

     

    Tuesday, February 08, 2011 1:20 PM

Answers

  • You can use the authoring tool to create your own custom workflows.

    In this case you would have to create a workflow that is triggered on a schedule and that runs a powershell script. The powershell script can with the help of SmLets (http://smlets.codeplex.com/) create a new Change Request with pre-defined title, description and assignee.

    Want me to do a blogpost on how to do it?

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    • Marked as answer by ViktoriaM Tuesday, February 08, 2011 2:13 PM
    Tuesday, February 08, 2011 2:04 PM

All replies

  • Hi Viktoria,

    Do you mean something like re-occruing incidents/changes on a pre defined time schedule?

    If so, you can should take a look at SmLets (or Opalis). With SmLets you can create a scheduled task in windows or create a custom workflow within SCSM to achive this.

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    Tuesday, February 08, 2011 1:48 PM
  • Hi Anders,

    it can be re-occuring Changes, for exapmle every friday a change for backup checks to be registered at a same time and assigned to specific user or group. Is this possible with custom workflows in SM? I think that workflows are usable after Item is created or updated - not before.

    ViktoriaM

     

    Tuesday, February 08, 2011 2:00 PM
  • You can use the authoring tool to create your own custom workflows.

    In this case you would have to create a workflow that is triggered on a schedule and that runs a powershell script. The powershell script can with the help of SmLets (http://smlets.codeplex.com/) create a new Change Request with pre-defined title, description and assignee.

    Want me to do a blogpost on how to do it?

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    • Marked as answer by ViktoriaM Tuesday, February 08, 2011 2:13 PM
    Tuesday, February 08, 2011 2:04 PM
  • Yes, please, it will be very helpful.

    Thank you.

    ViktoriaM

    Tuesday, February 08, 2011 2:12 PM
  • Hi Viktoria,

    See this link:
    http://www.scsm.se/?p=239

    I'll appreciate a comment if you managed to get it to work or not :)

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    Friday, February 11, 2011 3:18 PM
  • Hi Anders,

    Thank you very much for writing this blogpost, I think it will help me a lot if I succeed to implement it.

    I created the new Management pack and Tepmplate but I have problems to open the MP in Authoring Tool. I'm receiving an error message:

     "Could not load Management Pack. [ID=Microsoft.EnterpriseManagement.ServiceManager.UI.Console, KeyToken=31bf3856ad364e35, Version=7.0.5826.886]. The management pack was not found in the store"

    I tried several times but still recieving the same error. Maybe something with the versions.... Can you help to bypass this.

    Thank you,

    ViktoriaM

     

    Monday, February 14, 2011 12:55 PM
  • Hi again,

    So your production environment is CU3 (you should upgrade to SP1 CU1 tbh ;-) ). What version is your Authoring Tool? (Look in Programs and Features under the Control Panel).

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    Monday, February 14, 2011 1:30 PM
  • Authoring Tool is version 7.0.5826.620

    Thanks.

    ViktoriaM

    Monday, February 14, 2011 1:50 PM
  • That's the reason to why it's not working then. They need to be of the same version. Idk if it is possible to find the CU3 version of the Auth tool atm.

    Is there a reason why you haven't upgraded to SP1 yet?

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    Monday, February 14, 2011 1:55 PM
  • Anders:

    I followed your blog post and the CR is auto creating... however, the part of the blog that explains how to apply the template is NOT working. I have tried everything (using the GUID, the way you said to, even the standard.*change template). Its not applying the template. I set a workflow in  the U I to apply a template based on the title I assign in the Params section of the PS Script. This works, but the problem here is that the Activities contained in the CR do not have an MA or RA in front of them. This then causes issues with the exchange connector as it does not recognize entries without the MA or RA.

    So overall, are you sure this PS script works to APPLY the template? Any alternative solutions to the PS Script that may make the apply  template work better?

    Thanks

    Thursday, October 20, 2011 4:56 PM
  • Hi SorensonGreg,

    It did work when I wrote the blogpost, and just to make sure it still does, I just tested it, and it did. However, the prefix for the activites are missing for some reason (just as it does in your solution). I have no idea why and I can't really think of a good way to solve it right now.

    (Suppose it has something to do with how the template is applied. A CR is designed to be based on a template - not applying it after the CRs been created)

    Regards
    //Anders


    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se
    Sunday, October 23, 2011 1:29 PM
  • Anders... I found a solution!... You need to tweak  the xml MP that contains the template:

     

    Step 1: Find the MP That contains the template you are trying to call.

    Step 2: Locate the Template details in the XML of the MP.

    Step 3: Insert the following line of bold code between the other lines that already exist. Keep in mind that if you stored your template in an SCSM Unsealed pack (e.g. ChangeManagement.Configuration.Library, then you need to use the "CoreActiviry!" command statements not CustomSystem, etc). If you created your own unsealed pack for your custom templates then use the below. This will append the MA to the ID for all activities. Follow the same process for Review activities by replacing MA with RA

    <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ManualActivity']$">

     <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Id$">MA{0}</Property>

      <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/SequenceId$">0</Property>

     

    Monday, October 31, 2011 5:31 PM
  • I know this thread is a bit old but I'm running into this same problem in 2012.

    When I apply a template to a CR that contains an review or manual activity it drops the RA and MA prefixes.

    I've tried adding the lines above to my MP but it's still not adding the prefixes.

    My code:

    <Templates>
        <ObjectTemplate ID="Template.e0e2db25eb624a818e607a8665407062" TypeID="CustomCustomConvertServiceRequesttoChangeRequestMP!CustomForm_a52ca067_0e48_410d_bbe6_27917a3078ec_TypeProjection">
          <Property Path="$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Area$">f19da0b9-23d3-4b3a-3886-6abc09a7eaed</Property>
          <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']$">
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Id$">RA{0}</Property>
            

    • Edited by JayScovill Thursday, June 28, 2012 2:44 PM
    Thursday, June 28, 2012 2:38 PM