I've run into a case where I can't instantiate a Cron trigger via the TriggerBuilder if the end date is prior to the system date.
I'm rolling up our environment to 2.0 and we had a test that was using a date set in the past in order to verify that our triggers and jobs are being set properly.
However, due to the fact that in the TriggerBuilder the end date is set prior to the start date and that the startDate defaults to the sys date it is blowing the validation call in setEndDate.
This will allow the trigger to be built
While this will not
The only different being the endAt date.
Note that with while the first snippet will allow the trigger to build I end up getting the
org.quartz.JobPersistenceException: Couldn't store job: ORA-00933: SQL command not properly ended which I believe has already been fixed.
I originally thought I'd be able to work around it by just bailing out to using the CronTriggerImpl directly but then the record can't be retrieved from the JobStore with the endDate before startDate issue which blew when I actually tried to look it up to delete it.