ITMS Administrator Group

Expand all | Collapse all

Possible to run a Job or Task Once Only?

Jump to Best Answer
  • 1.  Possible to run a Job or Task Once Only?

    Posted 12-03-2019 06:50 PM

    Hello all,

    I have two command line scripts that I would like to run on all of our systems that have an agent.  However, not all the systems are online at one time.  Is it possible to setup a job that will run once on all systems once it is detected online?  That way they all get the commands but it is not constantly running on systems that have already run it.  Any tips or help is greatly appreciated.



  • 2.  RE: Possible to run a Job or Task Once Only?
    Best Answer

    Broadcom Employee
    Posted 12-04-2019 08:01 AM

    Hi,

    While "run once" option is not available you may create a job which will check for something at the beginning and run other tasks depending of the result of the check. For example, if you may add dir-create operation in predefine path at the end of yuor script. Then create a job which will check for the dir existance as the first step. Then add condition which will and run required commands only if check for dir will fail. Such job migh run on re-occuring schedule, but commands will be executed only on the clients which are "new".

    1. How job might looks like:

     

     

     

     

     

     

     

     

     

     

    2. Results of the first run:

    3. Re

     

    sults of the second run:

    HTH,

    Alex.

    p.s. another option is to create 'Client Task Schedule' (from right-click menu on Manage -> Jobs and Tasks page) and add task to it - as 'Client Task Schedule' is a policy it will run once by default. Also it is possible to add a task to 'Manage Software Delivery' policy.



  • 3.  RE: Possible to run a Job or Task Once Only?

    Posted 12-04-2019 08:10 AM

    I agree this should be an easy thing to do via CMS/ITMS. 

    I think creating the task and then under task status selecting new schedule adding the target computers there is the easiest way.  I forget, though, if a machine is powered off for 2 weeks, when it comes back online, will it run the task?  I forget what the default timeout is for doing a new task schedule that way.  Ideally there would be a configurable timeout value right in the task scheduling options.