Windows Task Scheduler claims successful execution despite return code of -1 (0xffffffff, 4294967295)

1

Having a very strange case here, where a windows task scheduler job executes a C# console application at a specific time, that returns -1 in case of an error. The job is configured to rerun itself if an error occurs.

The console app fails and returns the error code. The task scheduler recognizes the return code as 4294967295 (0xffffffff), which is -1 interpreted as a DWORD (unsigned int), claims a successful run and thus does not rerun the failed app.

Is this some kind of bug, where task scheduler is not realizing, that the app is returning a negative number, or am I missing something here?

windows
scheduled-task
.net
console
asked on Server Fault May 17, 2019 by lauxjpn

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0