[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Persian CronExpression for Quartz ( Shamsi or Jalali CronExpression) which uses Persian Calendar  XML
Forum Index -> Quartz
Author Message
javabegi

neo

Joined: 08/06/2010 07:16:21
Messages: 2
Offline

Hello,

I've implemented a PersianCronExpression parser for quartz-1.6.5 which is exactly like "org.quartz.CronExpression" class but it works with jalali fields. I mean you can use the jalali year, month, day, day-of-week and day-of-month fields(I've attached the source files to this post).

For example these are the samples of cron expression in jalali:

"0 0 0 1 1/1 ? 1387-1389"
"0/15 41 9 5 6 ? 1388"

The implementation use the "Mr Ghasemkiani Persian calendar" which you can find it at sourceforge.net. I've corrected some wrong behavior of calendar and included the source in attachment.

NOTE that as the "Mr Ghasemkiani Persian Clandar" is "arithmatic jalali calendar" so it only works correctly until year "1402 shamsi". After year 1402 the calendar has a "leap year" problem. So you can just use it until
year 1402 shamsi.

I hope oracle implements the PersianCalendar and places it in JDK so that we can use it with quartz.

Some aspects of cron-expression is fitted with jalai ( shamsi ) calendar, e.g. the working days are from shanbe to chahar-shanbe.

You can just change the CronExpresison of other version of quartz to provide PersianCronExpression.

If you have any question post it please.
 Filename Jalali Quartz Source.zip [Disk] Download
 Description
 Filesize 29 Kbytes
 Downloaded:  3065 time(s)

gyan10

ophanim

Joined: 06/28/2011 23:15:25
Messages: 701
Offline

This is an old thread and no update from a long time.Please let us know if you are still facing same issue.
Thanks

Gyan Awasthi
Terracotta -A Software AG company
javabegi

neo

Joined: 08/06/2010 07:16:21
Messages: 2
Offline

Hello gyan10

Actually this is not an issue, this is a developed feature for Persian users who still need it. Please do not remove it form issue list.
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline

In order to package your trigger with Quartz we will need a signed contributor's agreement (for copyright assignment, etc. and assurance that it can be distributed under Quartz's license (Apache 2.0)).

You can find the agreement document here:

http://www.terracotta.org/confluence/display/release/How+to+Become+a+Terracotta+Contributer
sad910

neo

Joined: 11/20/2015 08:31:12
Messages: 1
Offline

hello
I use jalali Persian calendar in my programming language(c#)
how can I use cron for my jalali Persian calendar to Schedul jobs
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team