Compiled package (.nupkg) does not run from task scheduler using .bat file on Azure virtual machine

I am trying to run a compiled bot (.nupkg) in an Azure virtual machine, using the task scheduler but it fails when it is run. It is seen that the UiRobot runs but automatically closes.

My .bat has:

start “” /min “C:\Users\NombreUsuario\AppData\Local\Programs\UiPath\Studio\UiRobot.exe” -file “D:\RPATEST\RPA_BOT\RPA_TEST.1.0.1.nupkg”

I also tried:

start “” /min “C:\Users\NombreUsuario\AppData\Local\Programs\UiPath\Studio\UiRobot.exe” -file “D:\RPATEST\RPA_BOT\RPA_TEST.1.0.1.nupkg” /input:“{‘StartedByTaskScheduler’:true}”

However, I get the same error.

In the task scheduler I have added this action

I thank you for your support in advance.

Cordial greetings.

You may take a look here: How to run UiRobot by Windows Task Scheduler (my experiment) - #22 by Joysogood

Why you are not using the Triggers from Orchestrator?

At the moment, I am using the community version. My UiRobot has version 21.10.5.0.
Also, I tried the shared link but it doesn’t work.
I just saw in the event viewer that I get the following error
image

but I already checked the bot and everything is fine. I have executed it in run file, in bug and all OK. help please.

Kindly be informed that Orchestrator is our web component for managing(Start, Stop, Schedule, etc.) the robots. It has other useful features like Asset, Queue, and central logging mechanism which makes the managing and monitoring easy for high scale environment.
You can still use an unattended bot without Orchestrator but you can trigger the robots either from the robot tray or from the UiPath studio or from Command Prompt.
The feature of remote trigger and scheduling will not be available in this case.
However, if you do not have Studio installed on the same machine: Trigger the jobs from the robot tray or from the command prompt.
If you want to start executing a specified workflow .json , .xaml , or .nupkg from the command prompt, please refer to the below commands:

Example:

UiRobot.exe execute --file "C:\UiPath\Automation\Project.json"
UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml"
UiRobot.exe execute --file "C:\UiPath\Automation\Notepad.1.0.6682.21636.nupkg"

Reference: Arguments Description

But, In case you need to run both unattended Robots from the command line with the schedule, then such functionality can only be used using Orchestrator.

Let us know if this information was helpful.

1 Like

The following command line for the cmd in an Azure virtual machine environment helped me:
start “” /min “C:.…\Studio\UiRobot.exe” execute --file “E:.…\Version\BOT_Temp.1.0.1.nupkg” /input:{‘StartedByTaskScheduler’:true}

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.