Simple Task Scheduler With PHP

See the original posting on DZone Python

During a more or less large project, a situation may arise when the number of scheduled tasks (cron jobs) becomes so large that their support becomes a DevOps nightmare. To solve this problem, I came up with the idea of creating a PHP scheduler implementation, thereby making it a part of the project, allowing the tasks themselves to be part of its configuration. In this case, the necessary and sufficient number of cron jobs will be equal to one.

Some time ago, I was able to develop a module for event planning. It was just a simplified version of Google/Apple Calendar for users of the application. For storing the dates and rules regarding the repetition of events, it was decided to use the iCalendar format (RFC 5545), which allows one line to describe a schedule for repeating an event, while taking into account the days of the week, months, the number of repetitions, and much more. A few examples: