本文介绍了等同于CRON的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 当我开发PHP网站之前,我们已经有了一个名为 CRON作业的服务器工具来设置某个页面在预定义的时间段运行(安排它) ASP.NET / IIS是否存在等价?我有一些脚本,我可以每天跑步,并且想知道最好的方法吗? 解决方案 你有几个选择。最接近您的问题的是可以执行计划任务的Windows服务。这将需要 在主机上安装服务,这可能是也可能不是。另一个选择是在Session_OnStart 事件处理程序中包含代码,它会检查日期和时间并在用户开始时运行或不运行任务 会议。 - HTH, Kevin Spencer ..Net开发商 微软MVP 大件东西组成 很多小东西。 安德鲁·班克斯 < BA **** @ nojunkblueyonder.co.uk>在消息中写道 新闻:KN ********************* @ news-text.cableinet.net ... 在我们开发PHP网站之前,我们已经有一个名为 CRON作业的服务器工具来设置某个页面在预定义的时间段运行(安排它) 第一个选项似乎更可靠,但我没有那个选项,因为我在一个 共享服务器上。 第二个选项很好但不是可靠。如果没有人访问该网站,则不会启动 会话,因此不会运行任何内容。 有没有人知道其他选择吗? " Kevin Spencer" < uc*@ftc.gov>在消息中写道 新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ... 你有几种选择。最接近您的问题的是是可以执行计划任务的Windows服务。这将需要在主机上安装服务,这可能是也可能不是。另一种方法是在Session_OnStart 事件处理程序中包含代码,该代码检查日期和时间,并在用户会话开始时运行或不运行任务。 - HTH, Kevin Spencer .Net开发人员微软MVP 很多东西都是由很多小东西组成的。 安德鲁·班克斯 < BA **** @ nojunkblueyonder.co.uk>在消息中写道新闻:KN ********************* @ news-text.cableinet.net ... 我之前已经开发了PHP网站之前我们有一个名为a CRON作业的服务器工具来设置某个页面在预定义的时间段运行(安排)有没有ASP.NET / IIS的等价?我有一些脚本,每天跑步我可以做b $ b,并想知道最好的方法吗? 你可以运行一个计划任务(在IIS / ASP之外);我想这取决于你的剧本。 Scott " Andrew Banks" < BA **** @ nojunkblueyonder.co.uk>在消息中写道 新闻:KN ********************* @ news-text.cableinet.net ... 在我们开发PHP网站之前,我们已经有一个名为 CRON作业的服务器工具来设置某个页面在预定义的时间段运行(安排它) When I''ve developed PHP sites before we''ve had a server facility called aCRON job to set a certain page to run at pre-defined periods (schedule it)Is there an equvalent for ASP.NET/IIS? I''ve got some scripts which I coulddo with running daily and wondered the best way to do this? 解决方案 You have a couple of alternatives. The closest fit to your problem would bea Windows Service that can perform a scheduled task. That would requireinstalling the Service on the host machine, which may or may not bepossible. Another alternative is to include code in your Session_OnStartEvent Handler, which checks the date and time and runs or doesn''t run a taskat the beginning of a user''s Session.--HTH,Kevin Spencer..Net DeveloperMicrosoft MVPBig things are made upof lots of little things."Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in messagenews:KN*********************@news-text.cableinet.net... When I''ve developed PHP sites before we''ve had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it) Is there an equvalent for ASP.NET/IIS? I''ve got some scripts which I could do with running daily and wondered the best way to do this?First option seems more reliable but I won''t have that option as I''m on ashared server.Second option is good but not as reliable. If no one visitis the site, nosessions are started and hence nothing will be run.Does anyone know any other alternatives?"Kevin Spencer" <uc*@ftc.gov> wrote in messagenews:%2****************@TK2MSFTNGP10.phx.gbl... You have a couple of alternatives. The closest fit to your problem wouldbe a Windows Service that can perform a scheduled task. That would require installing the Service on the host machine, which may or may not be possible. Another alternative is to include code in your Session_OnStart Event Handler, which checks the date and time and runs or doesn''t run atask at the beginning of a user''s Session. -- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message news:KN*********************@news-text.cableinet.net... When I''ve developed PHP sites before we''ve had a server facility calleda CRON job to set a certain page to run at pre-defined periods (scheduleit) Is there an equvalent for ASP.NET/IIS? I''ve got some scripts which Icould do with running daily and wondered the best way to do this?You could just run a scheduled task (outside of IIS/ASP); I guess it depends on your scripts.Scott"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in messagenews:KN*********************@news-text.cableinet.net... When I''ve developed PHP sites before we''ve had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it) Is there an equvalent for ASP.NET/IIS? I''ve got some scripts which I could do with running daily and wondered the best way to do this? 这篇关于等同于CRON的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 17:59