Resources

Knowledge Base

How to: Schedule a Task

Note: This feature is deprecated and no longer supported. 

*this feature is not compatible with the Community Edition

Schedule Task

Schedule Task is a feature in UiPath Studio that provides the ability to schedule a process to be executed at predefined time or after specified time intervals for current user. Check this article to schedule a task for a different user manually.

Where do I find Schedule Task?

In UiPath Studio, go to Setup tab and click Schedule Task.

After you click on Schedule Task the following window will be displayed.

  • In UiPath Schedule Task window we can schedule a task only using the default trigger: On a schedule (Time-based triggers include starting a task at a specific time of day or starting a task multiple times on a daily, weekly, or monthly schedule).
  • You can choose from the available settings: One time, Daily, Weekly or Monthly (Start date and hour)
  • Advanced settings

 

Now let's go over the available options in the next dialog:

  • Name: the name of the scheduled task (in our case the default is the Project / Process name). To schedule the same process more than once you have to change the name (e.g. "UiPath Task Scheduler" and "UiPath Task Scheduler 2").
  • Location: is the local folder in Windows Task Scheduler (e.g. C:\Windows\System32\Tasks\UiPath each task created with UiPath are saved in this folder)
  • Run only when user is logged on: the task will be executed in the Windows session of the currently logged on user.
  • Run whether user is logged on or not:  if the account is not logged on when the corresponding task is triggered, the service will use the saved credentials to run as the specified account in Windows session 0. You may be prompted to supply the credentials of the account when saving the task. UiPath doesn't store your username and password when are requested to create a new task. All these information are stored in Windows Credential Store. Make sure the Logon as batch job policy is set for the user.

Session 0 Isolation Explained

Each user that logs on to Windows is placed in a separate session. During startup, Session 0 is created and additional sessions are created as needed. Services always run in Session 0. For more details about this please check the following link.

Session 0 doesn't have a graphic interface

The easiest way to make your task interact with the UI is to split your project / process into small workflows. 

Workflows that interact with UI must be started from the main workflow through Launch Workflow Interactive activity (this activity automatically logs in an interactive Windows session if necessary)

Eg. 

The third activity will execute but you won't be able to see the message box. This is why it should be added into StartMsgBoxInt workflow.

As a backup solution you could change the commands line arguments of UiRobot. To do this go to Windows Task Scheduler -> UiPath Folder->Right click on your task and then select Properties -> Actions -> Edit . In Edit window change the word "process" with "executor".

 Now your task will be executed in the user account specified when prompted for credentials.

 NOTE: If you are scheduling the task in a Virtual Machine, make sure to add "/cc /preferConsole" parameters manually in the action.