Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A workaround for the fact that a scheduled task in Windows requires a user to be logged in

I am running a small executable created by a third party that needs to run at regular intervals on a Windows 2008 server. This executable effectively ETLs information from one system to another and needs to run every hour or so around the clock. As part of its processing the executable launches a small Windows Forms type UI.

I have set up a scheduled task to call the file and this works ONLY if the user under which the task is configured to run is logged onto the machine (either locally or via Remote Desktop). If I set the task to run as another user, or set the task to run when the user is not logged, on the scheduled task executes and errors. I have tried running as different users including Administrator user and System user. Is there any possible workarounds (without changing the third party code which I have no access to) which would allow this code to be run without a specific user logged in.

like image 917
AlexC Avatar asked Aug 04 '11 10:08

AlexC


1 Answers

It would seem that from the research I have done (and David Heffernan's answer), without affecting the source code, this is not possible.

There are some useful thoughts on How can I run a Windows GUI application on as a service? which relate to this but none give a viable workaround to this problem.

like image 117
AlexC Avatar answered Nov 16 '22 02:11

AlexC