can't read cron expressions for 6 positions in PHP YII1.1

Viewed 75

I want to convert cron values to human readable format.I have cron values that have 6 positions.these are the examples..

00 01 05 * * ?
0 0/5 * * * ?

I refer this http://mtdowling.com/blog/2012/06/03/cron-expressions-in-php/ but there are errors for 6 position cron values.

$cron = Cron\CronExpression::factory('0 0 0 ? 1/2 FRI#2 *');

echo $cron->getNextRunDate()->format('Y-m-d H:i:s');

error > **Invalid CRON field value 0 at position 2**

but 5 position cron values are work properly.

How can I solve this?thanks.

1 Answers

Five option cron values:

1 minute (0-59)
2 hour (0-23)
3 day of month (1-31)
4 month (1-12)
5 day of week (0-6) 0 for sunday
6 year(optional)


* * * * * *
1 2 3 4 5 6
Related