I am trying to setup a single execution of a job at a specific time in a timezone of a user using Quartz.
Now, out of the box, the only way I can tell the scheduler to execute anything in timezone is through cronSchedule
. Of coarse, I could, potentially, convert the datetime into a cron expression and then stop that trigger right after first successful execution, but that smells.
Note: Seems like SimpleSchedule
does not allow me to set a timezone.
Another option is to convert all the times provided by the user to the timezone of a scheduler, and then create the trigger with that time. But, this is prescription for disaster.
What is my best option here?
Thanks,