C#windows服务exe

编程入门 行业动态 更新时间:2024-10-21 10:07:07
本文介绍了C#windows服务exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请在下面的方案中建议。 我有一个逻辑,它将进行联合操作并向关注人发送邮件。此外,我们正在处理许多客户,所以我不能让单个exe为所有客户执行。因此我应该为每个客户提供单独的exe,但内部逻辑对所有人来说都是相同的。 我打算做C#windows服务。这是一个权利方法或任何其他方式,我可以为所有客户建立一个单独的构建。 我尝试过: 目前我们正在为每个客户端使用C#windows service exe,我需要在任务sheduler中单独进行管理。当我们迁移任何补丁时,它非常困难

please suggest below scenario. I have a logic which will do co-relation operation and send a mail to the concern person. Also we are dealing with many clients so i can't have single exe to perform for all customer. Hence i should have separate exe for each customer but inside logic is going to be same for all. I am planning to do as C# windows service.Is this a right approach or any other way where i can have a single build for all clients. What I have tried: currently we are using C# windows service exe for each client i need to separately shedule in task sheduler.Its very difficlut when we are migrating any patch

推荐答案

假设程序都做了完全相同的事情,但需要知道他们正在执行哪些客户的操作,那么你可以用一个略有不同的名称多次安装服务并传递一个参数让它知道哪个客户。 参见 c# - 如何使用参数创建Windows服务? - Stack Overflow [ ^ ]提供一些建议。 我做过类似的事情,但服务连续运行(未安排)并使用了filewatchers Assuming the programs are all doing exactly the same thing but need to know which customer they are performing the actions for then you can just installed the service multiple times with a subtly different name and pass it a parameter so it knows which customer. See c# - How to make a Windows service with parameters? - Stack Overflow[^] for some suggestions. I've done something similar but the services were running continuously (not scheduled) and utilised filewatchers

更多推荐

C#windows服务exe

本文发布于:2023-11-05 08:17:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560338.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:windows   exe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!