开发者

I would like to create Visual Studio deployment project that creates some scheduled tasks in a domain environment

I want to create a Visual Studio 2008 deployment project that installed some scheduled tasks in the commit phase. I'm working in a domain environment and I would also like the scheduled tasks to run whether the user is or is not logged on. So for this, the Task Schedules needs the password for the domain user. Also, the installation of the application is done over RDP, so figuring out the current logged in user is a problem. Any ideas on how开发者_JS百科 to do this would be very welcome.

Thank you,

Valeriu


You should create a windows service for this. See following:

https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5784748.html


Is this a centralized task scheduler or something that you want each user's machine to run?

For a centralized scheduler I would recommend, as Brij said, using a Windows Service. You could set the scheduler up as a plain method of the windows service or make a reference to your custom class and call a method from it.

A more flexible option is to host a WCF service in the windows service, and use the WCF service as your scheduler. You can communicate with the WCF service over the network also to have it do things. E.g. Change Schedule or Run Now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜