网页作为调度? [英] web page as a scheduler?

查看:169
本文介绍了网页作为调度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET表单应用程序,允许用户运行某些管理报告。有些报告必须按计划运行无人值守和我创建了一个C#控制台应用程序在任务计划程序在服务器上运行它们。这是权力坚持认为会有基于一台Web应用程序,所有这一切。

I have an ASP.NET forms app that allows users to run some management reports. Some reports need to be run unattended on a schedule and I created a C# console app to run them in Task Scheduler on a server. The powers that be are adamant that there be one web based app that does it all.

你如何可靠地按计划运行的作业,比如每日11:00 PM,从一个web应用程序?我看到Quartz.net作为调度一种选择,但你如何保持网页高达24/7?

How do you reliably run jobs on a schedule, say 11:00PM daily, from a web app? I see Quartz.net as an option for the scheduler, but how do you keep a web page up 24/7?

感谢

推荐答案

不管是什么是说的权力,你不应该依赖于一个ASP.NET应用程序是一个调度器。在从使ASP.NET Web应用程序写入(直接或通过一个数据层)的共享数据库中检索日程后端专门的服务并使其产卵的报告。

Regardless of what the powers that be say, you shouldn't rely on an ASP.NET app to be a scheduler. Have a dedicated service in the backend that retrieves the schedule from a shared database that the ASP.NET web app writes to (directly or via a data layer) and have it spawn the reports.

该方法


  • 避免可靠性问题:IIS工作进程可能在回收
    任何时候 - 你将不得不考虑到这里面增加了复杂性

  • avoids reliability issues: IIS worker processes may be recycled at any time - you would have to account for that which adds complexity.

限制了可能的安全限制:必须添加一定
权限IIS程序池的身份,使这些产卵
流程。这是更好地限制权利尽可能减少攻击面

limits possible security limitations: You would have to add certain permissions to the IIS AppPool identity to allow spawning of these processes. It's better to limit the rights as much as possible to reduce the attack surface.

这篇关于网页作为调度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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