调度多个 .NET Core 控制台应用程序 [英] Scheduling multiple .NET Core console apps

查看:51
本文介绍了调度多个 .NET Core 控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够安排一个测试 .NET Core 控制台应用程序,将程序/脚本设置为dotnet",将参数设置为mytestnetcoreconsoleapp.dll",并将启动目录设置为包含 dll 的目录.

I was able to schedule a test .NET Core 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?

据我对任务调度程序的了解,具有相同程序名称的多个任务是不可以的.我还意识到,我可以为每个控制台应用程序进行独立部署 (SCD),而不是框架相关部署 (FDD),以便获得唯一命名的 exe 文件,但这会扩大每个部署的大小,因为它们每个都有一个副本核心dll,对吗?

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?

推荐答案

将程序/脚本设置为dotnet" <- 这不起作用,至少不再起作用.由于某种原因,任务计划程序要求完整路径和文件名,因此您需要在那里输入C:Program Filesdotnetdotnet.exe".在带有最新补丁的 Windows Server 2012 R2 上确认了这一点.

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 Filesdotnetdotnet.exe". Confirmed this on Windows Server 2012 R2 with latest patches.

mytestnetcoreconsoleapp.dll"的参数 <- 正确

the args to "mytestnetcoreconsoleapp.dll" <- correct

包含dll的启动目录<-正确

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

这篇关于调度多个 .NET Core 控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆