Scheduling multiple .net core console apps

2019-07-12 04:56发布

I'm a newbie to .net core and have a question about how to schedule multiple .net core console apps in the Windows task scheduler. How I was able to schedule a test console app was to set the program/script to "dotnet", the args to "mytestnetcoreconsoleapp.dll", and the startup directory to that which contained the dll. Would this be correct to do for multiple console apps though? From what I understand about the task scheduler, having multiple tasks with the same program name is a no no. I also realize instead of framework dependent deployment (FDD) I could do self contained deployment (SCD) for each console app so as to get uniquely named exe files but that would explode the size of each deployment as they'd each have a copy of the core dlls, right?

1条回答
forever°为你锁心
2楼-- · 2019-07-12 05:17

set the program/script to "dotnet" <- this does not work, at least not anymore. For some reason task scheduler mandates full path and filename, so you need to enter there "C:\Program Files\dotnet\dotnet.exe". Confirmed this on Windows Server 2012 R2 with latest patches.

the args to "mytestnetcoreconsoleapp.dll" <- correct

the startup directory to that which contained the dll <- correct

查看更多
登录 后发表回答