Scheduling multiple .net core console apps

ε祈祈猫儿з 提交于 2019-12-10 23:31:51

问题


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:


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



来源:https://stackoverflow.com/questions/44849115/scheduling-multiple-net-core-console-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!