Download the PHP package phppkg/hucron without Composer
On this page you can find all versions of the php package phppkg/hucron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phppkg/hucron
More information about phppkg/hucron
Files in phppkg/hucron
Package hucron
Short Description Express crontabs as human readable phrases
License MIT
Homepage https://github.com/phppkg/hucron
Informations about the package hucron
HuCron
HuCron
turns human readable strings about time and turns them into valid crontabs.
phppkg/hucron
is froked from the https://github.com/ajbdev/cronlingo
Install
Usage
There are some examples for parse human statement.
Shortcuts statement
Custom statement
Syntax
HuCron
identifies the parts of a string with specific time-related keywords such as "on, to, at" and uses this to deduce the time meaning and convert it into part of a cron tab.
It's not particular about the order of these statements.
Here's a brief list of things that it will pick up and parse into a crontab:
- Periods (
daily, weekly, monthly
) - Exact times (
9:30 PM, 8a, 3p
) - Meridiems (
AM/PM/A/P
) - Intervals (
1st, second, other, ninth, etc
) - Specific fields (
second, minute, hour, day, month
) - Day of week (
sunday, monday
etc) - 12 o'clocks (
noon, midnight
) - Lists (e.g.
5 to 12 minutes
) - Month names (
january, february
, etc) - Weekend / weekday
What's a cron tab?
A cron tab is an expression that defines a recurring period of time.
It looks something like this:
From Wikipedia:
The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals.
Related
- https://github.com/dragonmantank/cron-expression Calculate the next or previous run date and determine
- https://github.com/lorisleiva/cron-translator Makes CRON expressions human-readable
LICENSE
MIT