Automic Workload Automation

Expand all | Collapse all

Automic REST API with execution time

  • 1.  Automic REST API with execution time

    Posted 08-15-2019 05:13 AM
    Edited by B Bharath Kumar Reddy 08-15-2019 05:20 AM

    Hello Everyone,

    I am trying to execute a script with a specific start time using the Automic REST API and below is my code snippet.

    {
      "object_name": "SCRI.REST_API_TEST",
      "alias": "SCRIPT_WITH_START_TIME_THROUGH_REST",
      "queue": "CLIENT_QUEUE",
      "execution_option": "once",
      "once":
      {
      	"execution_date_time": "2019-08-15T08:55:00Z"
      }
    }


    It is working fine if I'm executing this code once i.e. the script is not getting triggered until the given start time.
    However, if I execute the same code again i.e. first instance is waiting for the start time and I am making another run to wait for the start time, both the tasks are getting executing immediately without waiting until the start time.

    Note: There is no limitation on maximum number of parallel runs. I've tried the same thing from AWI using Execute-once option and both the tasks are waiting until the mentioned start time. 

    PS: The timings shown in the statistics are in UTC+03:00

    Am I missing anything here or do I have to use any other options in the REST code?

    the tasks with Alias


    ------------------------------
    Bharath B.
    ------------------------------


  • 2.  RE: Automic REST API with execution time

    Posted 08-16-2019 02:30 AM

    Hi Reddy

    I could not reproduce your issue. I was able to start an object twice with start-time in the future using the same bodyload as you did (AE v12.2).
    Check the report of the job, it might give an indication, why the start took place.

    Regards

    Joel



    ------------------------------
    Swisscom & WorkflowCommander
    ------------------------------



  • 3.  RE: Automic REST API with execution time

    Posted 08-19-2019 01:07 AM
    Hi Joel,

    Thank you for the reply. I am calling a script and it's not showing anything in the report/activation.

    Also, I want to know why the jobs are getting triggered well before the start time when I executed the same object twice through the above REST Call.

    ------------------------------
    Bharath B.
    ------------------------------