AutoSys Workload Automation

 View Only
  • 1.  Run job only once after creation.

    Posted Apr 19, 2020 03:21 AM
    I need to create a new job, it will run at a specific time the next day, but after that, it should not run by itself ever again until someone do a force-start. I know how to set the time but what should I put on my jil file that will stop the job from automatically start after the first run?


  • 2.  RE: Run job only once after creation.

    Posted Apr 19, 2020 08:59 PM
    Considered one-time override? 
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/intelligent-automation/workload-automation-ae-and-workload-control-center/11-3-6-SP8/reference/ae-job-information-language/jil-job-definitions/override-job-subcommand-define-a-job-override.html


  • 3.  RE: Run job only once after creation.

    Posted Apr 20, 2020 12:32 PM
    Isn't this a one-time override which happen the next time the job run, if the job run again after this one-time override, the override wouldn't work correct?
    I need to stop the job indefinitely.


  • 4.  RE: Run job only once after creation.

    Posted Apr 20, 2020 04:01 PM
    So, you'd define the job with "date_conditions: 0" and then create a one-time override to set "date_conditions: 1". Once the job runs successfully, the override will be done leaving the "data_conditions: 0" intact. "date_conditions" is your toggle. I hope it is clear now.


  • 5.  RE: Run job only once after creation.

    Posted Apr 21, 2020 02:16 AM
    ​Hi,

    You can a job that has 3 steps. 1st run a jil to add the job to autosys, 2nd run the force start command and 3rd run a jil to remove the job from autosys.

    example:
    jil < add.jil; force_start..... ; jil < remove.jil

    best regards.
    Jos´se


  • 6.  RE: Run job only once after creation.
    Best Answer

    Posted Apr 22, 2020 12:05 PM
    If you want to keep the job defined to AutoSys and run it on an as needed basis, I would create the job with date_conditions: 0 without any times or days so it doesn't have any scheduling criteria. Then issue a future sendevent to force start it on the date/time you choose. Since it doesn't have a schedule, it'll never run on it's own unless you manually start it.

    EX:  sendevent -e FORCE_STARTJOB -j DSM_LPZ_TEST_JOB_1 -T "04/23/2020 19:00"

    autorep -j DSM_LPZ_TEST_JOB_1 -d

    Job Name                                                         Last Start           Last End             ST/Ex Run/Ntry Pri/Xit
    ________________________________________________________________ ____________________ ____________________ _____ ________ _______
    DSM_LPZ_TEST_JOB_1                                               -----                -----                IN    0/0

      Status/[Event]     Time                 Ntry ES  ProcessTime           Machine
      --------------  --------------------- --  --  --------------------- ----------------------------------------
      [FORCE_STARTJOB]  04/23/2020 19:00:00    0  UP               <--- Notice that it shows tomorrows date.

    ------------------------------
    AutoSys Administrator
    Bank of America
    ------------------------------



  • 7.  RE: Run job only once after creation.

    Posted Apr 25, 2020 05:22 PM
    Insert_Job: ABC with date condition as 0.
    Then provide the desired day and Start time on override  :

    Override Job: ABC
    Days_of_Week:
    Start_Time:

    This will ensure your Job take its run as you provide it on override, and rest of day this job will not run till any SendEvent command is triggered.

    Hope that answered!!