Heim  >  Artikel  >  php教程  >  在线Crontab表达式执行时间验证

在线Crontab表达式执行时间验证

WBOY
WBOYOriginal
2016-06-06 19:37:221904Durchsuche

cron是一个linux下的定时执行工具,可以在无需人工干预的情况下运行作业。由于Cron是Linux的内置服务,但它不自动起来,可以用以下的方法启动、关闭这个服务。 怎么验证Cron是否正确?跑去来,执行一次就好了,貌似很慢啊~~~ 在线预览:http://www.atool.org/

cron是一个linux下的定时执行工具,可以在无需人工干预的情况下运行作业。由于Cron是Linux的内置服务,但它不自动起来,可以用以下的方法启动、关闭这个服务。
怎么验证Cron是否正确?跑去来,执行一次就好了,貌似很慢啊~~~

在线预览:http://www.atool.org/crontab.php

<?php

class Cron
{
    const MINUTE = 0;
    const HOUR = 1;
    const DAY = 2;
    const MONTH = 3;
    const WEEKDAY = 4;
    const YEAR = 5;

    private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE);
    public static function factory($expression)
    public function __construct($expression, FieldFactory $fieldFactory)
    public function setExpression($value)
    public function setPart($position, $value)
    public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
    public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
    public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false)
    public function getExpression($part = null)
    public function __toString()
    public function isDue($currentTime = 'now')

    protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false)
}
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn