Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Rendering while event scripts are still running

    Scheduled Pinned Locked Moved
    Templater Event Scripts
    2
    3
    794
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • alfiedawesundefined
      alfiedawes
      last edited by

      I’m just looking for a solution to a problem I’m facing with regard to running post-job scripts in a large batch using the bot. The script is in Node.js.

      The script I have uploads the videos to a video host, but has to wait for the host to process the video to then change some of the settings online.

      My problem is that the Bot seems to wait for the script to end before processing the next render, which is adding about 40 seconds.

      Is there a way of getting the bot to continue processing while a script is still running?

      1 Reply Last reply Reply Quote 0
      • alfiedawesundefined
        alfiedawes
        last edited by

        Found a solution! Credit goes to Arie from Dataclay for getting back to me via support ticket.

        For others looking to accomplish this, here is the advice I was given:

        "On Windows, for async processing, you likely need to execute the NodeJS script from a detached Windows Command Prompt, not the one directly called from Templater’s event manager. When Templater broadcasts the event, it uses the AE ExtendScript api call system.callSystem() function — which is a syncronoush operation. What you register to the post_cmd_job script needs to essentially spawn a detached Windows Command Prompt that then calls your NodeJS incancation. We’ve used Visual Basic on Windows to accomplish that in the past.

        Try creating a new visual basic script in a file called “detached-prompt.vbs”

        command = WScript.Arguments(0)
        Set objShell = CreateObject(“Wscript.shell”)
        objShell.run command

        Then register something like “cscript detached-prompt.vbs ‘node mynodescript.js’” to the event."

        1 Reply Last reply Reply Quote 0
        • ariestavundefined
          ariestav
          last edited by

          Alfie,

          You’re awesome for posting to this forum and then following up to help others! Much appreciated, and thank you for using our products.

          —Arie

          1 Reply Last reply Reply Quote 0
          • First post
            Last post