You might want to learn the org.quartz.CronExpression class in the Quartz API.
Note that you cannot simply compare a cron expression with a date, because a cron expression (usually) represents a sequence of different dates. In any case, you can find the following useful methods:
public boolean isSatisfiedBy(Date date) public Date getNextValidTimeAfter(Date date)
As for comparing two cron expressions, what would you like to compare? The only thing that IMO makes sense to compare is the following βtriggerβ dates, i.e. Dates received from getNextValidTimeAfter ([some reference date]).
source share