Guide: Setting up an RDA using Windows' Task Scheduler

In this guide I am going to showcase how you can utilize Microsoft’s Task Scheduler to run your Robin scripts at specified intervals.
Through the Task Scheduler you can set up rules (specific triggers and/or time intervals (schedules) to run you .exe or .ps1 files that utilize your Robin scripts.
This way you can practically create Robotic Desktop Automation flows.

In this guide I will be utilizing the .exe that was generated by the source I created in the guide, showcasing how to execute .robin scripts through C# code.

You can find the guide here: Quick guide: Utilize Robin Scripts through C#

Note: I will be using Windows 10 but the steps should be pretty much the same for Windows 8.1/7 as well.

Task Scheduler comes pre-installed with every Windows installation.

You can find it by clicking on the “Start” button and searching for it:

Right-click the “Task Scheduler Library” branch, and click on the New Folder option.
image

Give an appropriate and distinct name to your folder, I named mine “Custom”.

Note: This step isn’t required but it is strongly recommended
in order keep your tasks separate from the system and application tasks.

Right click on the folder you just created and click on “Create Task” option:
image

Give a distinct name to your Task and a detailed description:
image

Now to the security options (I will leave them default):
image

Some info regarding the security options:

  • You can choose the administrator account(s) that can run the task.
  • Choose whether the task can run when you are logged on or it can run even if you are not.
  • If the scripts require administrative access, you should tick the “Run with highest privileges” checkbox.
  • The Hidden option dictates whether a task will run in the background or not.
  • Leave the “Configure for:” option as is if there is no special need.

Go to the “Triggers” tab.
Create a new one.
You are presented with the following screen then:

  • You can choose from a set of rules when to start your task
    (I will leave the “On a schedule” option as is).
  • In the example we want the task to run on a monthly basis so I will choose the “monthly” radio button.
    image
  • Then I will select all the months:
    image
  • Click the “On” option and select “Last” and “Friday” as options.
  • I will leave the advanced settings unchanged.
    The screen should look like this:
  • Click the OK button.

Go to the “Actions” tab.
Create a new one.
After selecting the .exe (or Powershell script) you want to run the window should look like this:
image

  • Click the OK button.

I am going to leave the Conditions options with their default values, just some notes:
image
Always pay attention to the -Power- section, you might want the PC to be awaken in order to run the task, if the task is of great importance.

Go to the “Settings” tab.
The “Settings” tab includes additional options that will directly affect the behavior of the task. It’s not mandatory to modify these options, but it’s a good idea to check the following options:
image
Think of them as a safety mechanism.

  • Click the OK button.

You can see that a new task has been created:

In order to test its functionality (and not wait for any triggers/conditions to be met) you can run it straight away.
Right click the newly created task and press “Run”:
image

As expected a console application is run, it utilizes a .robin script internally and the functionality showcased in this tutorial is executed.

Note: You can export and import tasks.
This way you can distribute them along with the requisite files (.exe and robin scripts), of course by modifying them accordingly (filepaths for example).
image
image

Best regards,
J.


James Papadimitriou
Technical Evangelist

4 Likes

@jpap, very comprehensive guide, thank you.
The tip about the Custom folder is especially useful, I had not considered that. One might even name the folder “Robin”, I suppose, to distinguish it from other custom tasks.
Regards,
burque505

1 Like

Hello @jpap,@burque505 I want create a scheduler if a specific email is Received then triggered Robin file after that email received.
can you help me with this?

@abhi1100 create a daemon process to check the email, If expected mail has arrived it has to trigger the bot.

1 Like