I am trying to schedule a task using Task Scheduler on Windows. It is for a console app written with .net Core. I have created a task, set a trigger and created a new action.
When I manually run it, I get a 'Last Run Result' of 'The system cannot find the file specified. (0x80070002)'. I have ensured that the user account running the task has access to the database on SQL Server.
I ran it in the command line as dotnet "C:\Program Files\UTDT_Database_Update\publish\UTDT_Database_Update.dll" and it worked successfully.
My 'Edit Action' is as follows.
Program/Script: dotnet
Add arguments (optional): UTDT_Database_Update.dll
Start in (optional): C:\Program Files\UTDT_Database_Update\publish\
I haven't found any solutions that work yet. Anyone have any ideas?