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

Scandal

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) :
1.png

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

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