[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8367":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":16,"starSnapshotCount":16,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},8367,"cron-expression","mtdowling\u002Fcron-expression","mtdowling","CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due","http:\u002F\u002Fmtdowling.com\u002Fblog\u002F2012\u002F06\u002F03\u002Fcron-expressions-in-php\u002F",null,"PHP",4863,337,64,6,0,1,29.59,"MIT License",false,"master",[],"2026-06-12 02:01:52","PHP Cron Expression Parser\n==========================\n\n[![Latest Stable Version](https:\u002F\u002Fposer.pugx.org\u002Fmtdowling\u002Fcron-expression\u002Fv\u002Fstable.png)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fmtdowling\u002Fcron-expression) [![Total Downloads](https:\u002F\u002Fposer.pugx.org\u002Fmtdowling\u002Fcron-expression\u002Fdownloads.png)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fmtdowling\u002Fcron-expression) [![Build Status](https:\u002F\u002Fsecure.travis-ci.org\u002Fmtdowling\u002Fcron-expression.png)](http:\u002F\u002Ftravis-ci.org\u002Fmtdowling\u002Fcron-expression)\n\n**NOTE** This fork has been deprecated and development moved to [https:\u002F\u002Fgithub.com\u002Fdragonmantank\u002Fcron-expression](https:\u002F\u002Fgithub.com\u002Fdragonmantank\u002Fcron-expression). More information can be found in the blog post [here](http:\u002F\u002Fctankersley.com\u002F2017\u002F10\u002F12\u002Fcron-expression-update\u002F). tl;dr - v2.0.0 is a major breaking change, and @dragonmantank can better take care of the project in a separate fork. \n\nThe PHP cron expression parser can parse a CRON expression, determine if it is\ndue to run, calculate the next run date of the expression, and calculate the previous\nrun date of the expression.  You can calculate dates far into the future or past by\nskipping n number of matching dates.\n\nThe parser can handle increments of ranges (e.g. *\u002F12, 2-59\u002F3), intervals (e.g. 0-9),\nlists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to\nfind the last day of the month, L to find the last given weekday of a month, and hash\n(#) to find the nth weekday of a given month.\n\nInstalling\n==========\n\nAdd the dependency to your project:\n\n```bash\ncomposer require mtdowling\u002Fcron-expression\n```\n\nUsage\n=====\n```php\n\u003C?php\n\nrequire_once '\u002Fvendor\u002Fautoload.php';\n\n\u002F\u002F Works with predefined scheduling definitions\n$cron = Cron\\CronExpression::factory('@daily');\n$cron->isDue();\necho $cron->getNextRunDate()->format('Y-m-d H:i:s');\necho $cron->getPreviousRunDate()->format('Y-m-d H:i:s');\n\n\u002F\u002F Works with complex expressions\n$cron = Cron\\CronExpression::factory('3-59\u002F15 2,6-12 *\u002F15 1 2-5');\necho $cron->getNextRunDate()->format('Y-m-d H:i:s');\n\n\u002F\u002F Calculate a run date two iterations into the future\n$cron = Cron\\CronExpression::factory('@daily');\necho $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s');\n\n\u002F\u002F Calculate a run date relative to a specific time\n$cron = Cron\\CronExpression::factory('@monthly');\necho $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s');\n```\n\nCRON Expressions\n================\n\nA CRON expression is a string representing the schedule for a particular command to execute.  The parts of a CRON schedule are as follows:\n\n    *    *    *    *    *\n    -    -    -    -    -\n    |    |    |    |    |\n    |    |    |    |    |\n    |    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)\n    |    |    |    +---------- month (1 - 12)\n    |    |    +--------------- day of month (1 - 31)\n    |    +-------------------- hour (0 - 23)\n    +------------------------- min (0 - 59)\n\nRequirements\n============\n\n- PHP 7.0+\n- PHPUnit is required to run the unit tests\n- Composer is required to run the unit tests\n","mtdowling\u002Fcron-expression 是一个用于解析和计算 CRON 表达式的 PHP 库。它支持解析标准的 CRON 语法，能够判断表达式是否即将运行，并计算下一次或上一次的运行时间。此外，该库还支持复杂的表达式特性，如范围、间隔、列表等。适用于需要在 PHP 应用中实现定时任务调度的场景，例如定期执行数据备份、发送邮件提醒等自动化操作。通过 Composer 可以轻松集成到项目中，使用简单且功能强大。",2,"2026-06-11 03:17:33","top_language"]