本文介绍了在PHP定时任务(类似cron)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个功能齐全,作业调度封装为PHP?我正在寻找的PHP相当于Java的。我是从cron外部触发驱动系统具有优良的东西。我寻找的功能:

Is there a full featured, job scheduling package available for PHP? I'm looking for the PHP equivalent to Java's Quartz. I'm fine having things triggered externally from cron to drive the system. The functionality I'd be looking for:


  • 能够注册任务(类/方法)是在给定的时间间隔调用。

  • 能够指定是否给定的任务可以(在某些情况下可能会长时间运行的方法不应该多次运行)多次运行。

  • /方法可以并行运行的所有注册项(作业后台运行,使它们不会阻止其他定时任务)。

  • 能够设置一个超时给定任务。

  • 能够动态更新作业控制,所以比如你可以禁用某些任务或更改其频率而不code的变化。

我知道这是一个很大要求,但似乎功能有用的一批,我想有人可能已经把他们的某些部分。

I know it is a lot to ask, but it seems like a useful batch of features and I thought someone might have put together some portion of them.

如果这本或某些部分不存在,以把一只共同的指针或具有相当多特征的实施这些某个子集的一个开源项目?

If this or some portion of this does not already exist, any pointers to putting one together or an open source project that has a reasonably featureful implementation of some subset of these?

推荐答案

一个快速谷歌变成了几个像样的结果:

A quick google turns up a few decent results:





  • http://www.bitfolge.de/pseudocron-en.htm
  • http://www.phpclasses.org/browse/package/4140.html
  • http://www.hotscripts.com/Detailed/61437.html

真的,不过,如果你在任何像样的共享主机包,你应该有机会获得某种任务调度的无论是Windows的任务调度程序或cron的下* nix中。我知道DreamHost的允许用户级别的crontab,至少。

Really, though, if you're on any decent shared hosting package you should have access to some sort of task scheduler be it Windows' Task Scheduler or cron under *nix. I know DreamHost allows user level crontabs, at least.

心连心

这篇关于在PHP定时任务(类似cron)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 22:54