AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  Command to add an optional task to a scheduled session

    Posted Oct 20, 2022 11:20 AM
    DUAS V6.10 Windows 2019

    Looking to script the creation of tasks where sessions are scheduled.  Easy enough to duplicate a task to a new task with a new session using the command uxdup tsk and the task is created fine. 

    As it is a session there are a couple of the uprocs in the session that also need to run on specific days, easily handles by the used of optional tasks associated with the main task.  Is there a way that an optional task can also be duplicated then attached to the new scheduled task just created? Can't seem to see an obvious command in the manual and the uxdup command only duplicates the primary scheduled task.


  • 2.  RE: Command to add an optional task to a scheduled session

    Posted Oct 31, 2022 07:14 AM
    Ok have figured thi out essentially a 3 step process
    1 - duplicate the main scheduled task of the task that is to be duplicated
    2 - duplicate the secondary optional tasks of the main scheduled which was dulicated above, remember to specify new task names for the secondary tasks and specify the new secondary uprocs and sessions
    3 - add the new secondary tasks to the new scheduled main task using an update command including also updating the task label

    Commands

    1 - uxdup tsk tsk=<SOURCE_MAIN_TASK> ses=<SOURCE_MAIN_SESSION> upr=<SOURCE_MAIN_SESSION_HEADER> MU=<SOURCE_MU> ttsk=<TARGET_MAIN_TASK> TSES=<TARGET_SESSION> tupr=<TARGET_SESSION_HEADER> TMU=<TARGET_MU>

    2- uxdup tsk tsk=<SOURCE_SECONDARY_TASK> ses=<SOURCE_MAIN_SESSION> upr=<SOURCE_SECONDAY_UPROC> MU=<SOURCE_MU> ttsk=<TARGET_SECONDAY_TASK> TSES=<TARGET_SESSION> tupr=<TARGET_SECONDARY_UPROC> TMU=<TARGET_MU>

    3 - Update task label
    uxupd tsk tsk=<TARGET_SECONDAY_TASK> ses=<TARGET_SESSION> upr=<TARGET_SECONDARY_UPROC> MU=<TARGET_MU> TECHINF LABEL="SECONDAY TASK LABEL"
     - Add SECONDARY to NEW MAIN TASK
    uxupd tsk tsk=<TARGET_SECONDAY_TASK> ses=<TARGET_SESSION> upr=<TARGET_SECONDARY_UPROC> MU=<TARGET_MU> PARENT PARENT_TSK=<TARGET_MAIIN_TASK> MU=<TARGET_MU>