10 18 16 ? * SUN,MON,WED,FRI *
cron expression then how to convert into Java date.10 18 16 ? * SUN,MON,WED,FRI *
and 0 30 9 30 * ?
Please use:
import org.springframework.scheduling.support.CronSequenceGenerator;
final String cronExpression = "0 45 23 * * *";
final CronSequenceGenerator generator = new CronSequenceGenerator(cronExpression);
final Date nextExecutionDate = generator.next(new Date());
...and then I suggest use Joda DateTime for date comparison.