AutoSys Workload Automation

  • 1.  Schedule Multiple Adhoc Job Runs

    Posted Jan 28, 2019 01:53 PM

    I am new to Autosys and cannot find an answer to this.

     

    I have a job that runs only when requested by the user. The user submitted this request to run the job as specified:

    Start date/time(s):

    1/23/19 @ 8 PM CT

    1/28/19 @ 6 AM CT

    1/28/19 @ 8 PM CT

    1/29/19 @ 8 AM CT

    1/29/19 @ 8 PM CT

    1/30/19 @ 8 AM CT


    Creating an override allows me to do this 1 date/time at a time, so this is not feasible. An adhoc calendar lets me select the dates, but the submit times are different for different dates and I prefer not to alter the job's properties, which will need to be reverted after the request is completed.

     

    Is there a way to schedule all of these runs ahead of time?



  • 2.  Re: Schedule Multiple Adhoc Job Runs

    Posted Jan 28, 2019 04:20 PM

    What do you mean by Ahead of time?

    is the time & date changing every month?

     

    You can issue a future sendevent command instead of scheduling it

    or

    if the above dates & time is what you want the job to run, then in the autocal_asc, you can create a std calendar & mention the time along with dates & your job will run as per given date & time.

     

    May be explain your requirement in more detail.



  • 3.  Re: Schedule Multiple Adhoc Job Runs

    Posted Jan 28, 2019 05:04 PM

    By "ahead of time" I mean to schedule all of the runs on the day I receive the request, so that I do not have to remember to run the job on each requested day, at each requested time.

     

    In the example request, there is no pattern. The 2nd run is at an earlier time, 6 AM, compared to other dates.

    The user wants JOB_A to run as follows:

    1/23/19 @ 8 PM CT

    1/28/19 @ 6 AM CT

    1/28/19 @ 8 PM CT

    1/29/19 @ 8 AM CT

    1/29/19 @ 8 PM CT

    1/30/19 @ 8 AM CT

    Creating something like an "override" that lasts through the last requested run would be what we want, but "overrides"  do not work that way. They are for single exceptions.



  • 4.  Re: Schedule Multiple Adhoc Job Runs
    Best Answer

    Posted Jan 29, 2019 02:31 PM

    You can issue future sendevent command as given below instead of scheduling it. The jobs will trigger as per the time zone configured at job level in JOB_A.

     

    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/23/19 20:00"
    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/28/19 06:00"
    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/28/19 20:00"
    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/29/19 08:00"
    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/29/19 20:00"
    sendevent -e FORCE_STARTJOB -j JOB_A -T "01/30/19 08:00"

     

    In this approach you can specify any random time as per your requirement.



  • 5.  Re: Schedule Multiple Adhoc Job Runs

    Posted Mar 18, 2019 10:25 AM

    Thank you for the answer. I will give this a try.

    Regards.



  • 6.  Re: Schedule Multiple Adhoc Job Runs

    Posted Mar 19, 2019 07:49 AM

    if the job in untimed then you should use STARTJOB in future. FORCE start is a nuke. and if the job is already running or on ice etc. you may cause problems. I would NOT use FORCE as MAQ suggested but change to STARTJOB.

    it is safer. Just as safe an efficient is setting a global variable at that time. and have the job trigger from the set. :-) 

    either way FORCESTART is dangerous.