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?
User contributions licensed under CC BY-SA 3.0