Skip to content

Instantly share code, notes, and snippets.

View pepeloper's full-sized avatar
🚀

Pepe pepeloper

🚀
View GitHub Profile
@pepeloper
pepeloper / CronSchedule.php
Created October 2, 2017 14:24 — forked from m4tthumphrey/CronSchedule.php
CronSchedule.php - Allows one to parse a cron expression into human readable text.
<?php
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
*
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.