Windows Server 2016: Task Scheduler "Launch task ... same task is already running"

  • Thread starter Thread starter vzmon1
  • Start date Start date
V

vzmon1

Guest
Environment: VM Windows server 2016, x64 base, 8GB Mem

Utility App: Console .Net 4.6.1

App Function: Alerts if files not received on time; otherwise it does nothing

Task Job Configuration: Runs every hour (11 minutes after the hr.) / indefinitely, all week

Task is run under a Service ID with the highest privileges

Task is configured to force stop after 30 minutes; this job doesn't run more than 2 minutes.


1. I consistently see "Launch" errors due the system "seeing" an instance of the job already running.

a. I logged on with the Service ID, and via the Task Mgr. I saw the .EXE come into view and disappeared after 2 minutes. This is the expected results.

b. The Task history indicates that job completes successfully.

c. In the code, I explicitly relinquished all resources and explicitly exited the app; System.Environment.Exit(0) to see if this made any difference; it did not.

d. I deleted the task on the test server, and created it again with the same name. The system saw the previous task iteration’s history

e. This issue seemed to manifested after we moved to Server 2016 from 2008 R2

f. Since this is an innocuous app, I moved it to prod, creating the task job from scratch. Test & Prod server are similarly created. The issue started to appear after 24 hours in prod

g. Only two tasks in PROD exhibit this system, and they have 2 different code base


As far as I can tell the app is functioning as expected despite the "Launch" errors. Although due to how the app works, I’m not 100% sure that the app was active to determine whether or not the files were in the folder. I’m considering to set the task scheduler kill the running instance as a work around, but I would like to get to the root of the issue.


Note:

1. I'm not a server admin, I'm in an application support / dev role. The server admin dept. was kind enough to leave me to my own devices to solve this issue

2. I have the same issue on the test server, but the code doesn’t explicitly exit the app. I'm not sure if this is the right forum, but the MS forum seem to indicate this is the forum for Task Scheduler issues.


I greatly appreciate any guidance on how best go about troubleshooting this issue.

Continue reading...
 
Back
Top