XF 2.2 XF:CronEntry - I want to characterize them based on the running frequency


Well-known member
XF:CronEntry entity has the array column run_rules.

Based on these run_rules, I want to characterize a CronEntry as daily, weekly, monthly, yearly or multiple times per day.
For example to make a getter which returns 'daily', 'weekly' and so on.

Could anyone give some ideas?

\XF::dump($this->run_rules) examples:
These cron runs every 1 (!) minute (multiple times per day) :

These cron runs every 1st December (yearly) :
These cron runs every day at 00:00 (daily) :
and so one.

Those are just some examples, of course I'm looking for a solution which includes any case.
Any idea? :)
Top Bottom