events format to cron4j

Hello. I need to convert somehow dhtmlxScheduler events default format
(ex. JSON: [{ start_date:“2010-04-26 02:20” , end_date:“9999-02-01 00:00” , text:“Example decription” , id:“1272292906904” , rec_pattern:“week_1___1,3,5” , rec_type:“week_1___1,3,5#no” , event_length:“300” }] ) to cron4j format:

Some examples output format I want:

5 * * * *
This pattern causes a task to be launched once every hour, at the begin of the fifth minute (00:05, 01:05, 02:05 etc.).


This pattern causes a task to be launched every minute.

  • 12 * * Mon
    This pattern causes a task to be launched every minute during the 12th hour of Monday.

  • 12 16 * Mon
    This pattern causes a task to be launched every minute during the 12th hour of Monday, 16th, but only if the day is the 16th of the month.

Every sub-pattern can contain two or more comma separated values.

59 11 * * 1,2,3,4,5
This pattern causes a task to be launched at 11:59AM on Monday, Tuesday, Wednesday, Thursday and Friday.

Values intervals are admitted and defined using the minus character.

59 11 * * 1-5
This pattern is equivalent to the previous one.

Someone please have a clue?

greetz, Miguel

There is no ready to use solution, but we have some experimental helpers for converting recurring events between iCal and scheduler’s format. Because iCal is very popular format it pretty possible that there is a iCal-to-cron4j converter exists somewhere.