Link to home
Start Free TrialLog in
Avatar of Russ Dillion
Russ DillionFlag for United States of America

asked on

Scheduled task on Windows 2016 EC2 instance will not run

I cannot get a scheduled task to consistently run on a Windows 2016 system.  The system is an EC2 instance in AWS, and I need it to run a task that essentially calls a .bat file on the local system.  The .bat file then runs a .vbs file on a mapped drive and runs it in the SysWOW64\cscript.exe context.  Initially I was getting errors related to the CLSID and APPID not being able to run using the configured account, and used the DCOM configuration to add the required permissions.  After doing that, I have been able to occasionally get the task to run, but for the most part it does not.  I've been searching for a resolution and have found a number of suggestions, none of which have worked.  When I look at the history of the task it indicates that the task completes successfully, but the end result of the task is that a new folder is created on the mapped drive and two .xml files are deposited there, which in turn are used to update a database for one of our applications.  In spite of the history showing that the task completes, the new folders and files are not created.  I can run the batch file manually and it succeeds every time.  I have tried configuring the task to open the batch file on the local drive, to open the cscript.exe application and add the path to the .vbs file as an argument, given it a "Start in" value, etc, etc, and nothing will work consistently.  I'm looking for other ideas to get this thing to run.  Any thoughts \ help is greatly appreciated!
Avatar of SquigglyMonkey
SquigglyMonkey

Is "Run whether logged in or not" selected?
Also is "Run with highest privileges" checked?
Avatar of Russ Dillion

ASKER

Thanks for taking a look at the question.  Yes, I've tried both of those options in varying configurations, as well as the option to configure the task for the various OS options, all to no avail.
ASKER CERTIFIED SOLUTION
Avatar of Russ Dillion
Russ Dillion
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial