Navigation

    OpenIAP

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Scheduling Robot

    Blogs
    openflow openrpa
    1
    1
    1278
    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.
    • Allan Zimmermann
      Allan Zimmermann last edited by Allan Zimmermann

      This question comes up a lot. There is several ways you can run a robot at an interval.
      NodeRED
      The primary way you do that is using NodeRED. NodeRED has several modules for scheduling new messages, I normally go for node-red-contrib-cron and lookup the syntax at crontab.guru
      6155e005-ce15-409a-8394-83a025743113-image.png

      External application
      You can schedule jobs from an external application, or using Microsoft task scheduler and then execute a workflow using command line parameters to the robot. You have 2 options for invoking the robot from command line, you can use the openrpa.exe file directly or you can use PowerShell to get even more control over the execution
      command line
      openrpa.exe now accepts a number of key value pairs for running workflows from command line.
      you can use - or / for defining the key, but it is optional
      workflowid can either be the id for the workflow or the relative path ( project \ filename )
      for instance

      OpenRPA.exe /WorkflowID 5e451402478059b6448ec23f
      OpenRPA.exe /workflowid project1\add_to_notepad.xaml
      

      if the workflow takes arguments you can also send those from command line, for instance add_to_notepad takes a parameter with the name text, that it adds to notepad

      OpenRPA.exe /workflowid "dev\add_to_notepad.xaml" -text "Hi mom"
      

      You can grab the id or relative path by right clicking the workflow in Open project tab in the robot
      f8353be6-eb69-481b-b217-603a6dc20cd4-image.png

      PowerShell
      Using the PowerShell module you can also run openrpa and openflow workflow. You can pipe an object or hash table to the command to fill out workflow arguments and Invoke-OpenRPA will per default with for the workflow to complete and return an object with all out arguments. This allows for for much better control since you can now parse the result.
      92477463-a90f-4ed7-8830-229e711bb222-image.png

      Invoke-OpenRPA -Filename 'SDEMO\AddRobotTag.xaml'
      # or with arguements
      @{"text"= "Hi mom"} | Invoke-OpenRPA -Filename 'SDEMO\AddRobotTag.xaml'
      

      Long running workflow
      You can create a workflow that never ends.
      A State Machine or even a simple DoWhile with a sleep, is a perfectly acceptable way to , "wake up" once in a while and check if it's time to run the workflow using Invoke OpenRPA activity
      3f60d0dd-f5a3-45d0-840f-d5d4d0a9db7f-image.png

      1 Reply Last reply Reply Quote 0
      • Referenced by  Allan Zimmermann Allan Zimmermann 
      • Referenced by  A axel.rp 
      • Referenced by  Allan Zimmermann Allan Zimmermann 
      • Referenced by  C Colby Cruwys 
      • Referenced by  Allan Zimmermann Allan Zimmermann 
      • Referenced by  Allan Zimmermann Allan Zimmermann 
      • Locked by  A az 
      • First post
        Last post