Reliable way to trigger RF batch file on Win Server

Can anyone recommend a good free program to execute batch file on windows server, The built in Win scheduler does not seem to want to “wakeup” once a person has logged off no matter how its configured. Thanks.

You mean running batch file as service? The service must be assigned to a system user, which does not log off.

I like to use FireDaemon to create windows services.

Hi Brendan,

The built in Win scheduler will “wakeup” once a person has logged off, but it depends on how it’s configured. By default when you create a scheduled task, the task will be stored in the registry of the current user, in that case yes it will not run in that user is not logged on.

The other options are running the task as a service with either the system account or a nominated service account. Also you need to have administrative rights to the machine to configure these.

Before I go into the details of configuring scheduled tasks for these options, you need to consider if that is the right for your situation (generally the answer is no), because when a scheduled task runs as a service there is no GUI for the service to interact with, so depending on which library you are using it the tests will probably fail anyway (SeleniumLibrary will likely fail because the browsers usually crash without a GUI to talk to even in headless mode, likewise anything that runs a GUI application will also fail).

There is another option, if you can secure physical access to the machine you can configure auto-login then the user will remain logged in after a reboot and your scheduled task will run.

If you can confirm which library (libraries) you need to use, if you have admin access to your machine and which windows version I can try to walk you through the configuration steps.

Also it’s worth noting that using some other software tool to schedule the test to run is going to have the same issues as above, it’s an OS permissions issue not a scheduling software issue.

Dave.

1 Like

Thank you for this detailed reply. I am try to fix this issue.

Hi Dave,

I use RPA Windows library to automate GUI application. I face the problem that you mentioned so when task scheduler runs the batch script which runs Robot script there is no GUI started. Do you know any workaround for that?

Hi Michał,

Refer to my previous post, a gave all the options and their pro’s and cons.

Unfortunately that’s the limitations of windows and it’s security policies.

There is one more possibility if you are on a windows server (not a desktop os), you could create an RDP session to the server and have the schedule task run as the user account of that rdp session, the down side of this is every time the server is restarted (intentionally or unintentionally) you will need to recreate that rdp session.

Dave.