Zhang Zhan
Zhang Zhan

Reputation: 905

AWS EC2 Windows schedule job fails while offline

I created a Windows instance on AWS EC2 with T2 Micro, where I set up a schedule job that calls a .bat file at 6 every morning.

The .bat job invokes a few other scripts that mainly carry out some Internet-related transactions, including launching browsers, call services and perform I/O operations.

The issue is in most of the time the .bat file is not able to complete its job (Sometimes it does, but pretty rare). Later on, if I connect to the EC2 instance via remote desktop with the same username and manually call that .bat file, everything works fine.

Anyone has ever experienced this kind of problem and what is the resolution?

Thank you.

Upvotes: 1

Views: 123

Answers (1)

Jeremy Thompson
Jeremy Thompson

Reputation: 65692

It's a common problem with automation. Some of the things you're doing such as "launching browsers" may not work for unattended execution.

A good example is Selenium, if you want to run web tests unattended then you need the headless version of Selenium, here's how to set it up for Headless:

Running Selenium with Headless Chrome Webdriver

Upvotes: 1

Related Questions