JobDataMap Tips
Only Store Primitive Data Types (including Strings) In the JobDataMap
Only store primitive data types (including Strings) in JobDataMap to avoid data serialization issues short and long-term.
Use the Merged JobDataMap
The JobDataMap that is found on the JobExecutionContext during job execution serves as a convenience. It is a merge of the JobDataMap found on the JobDetail and the one found on the trigger, with the value in the latter overriding any same-named values in the former.
Storing JobDataMap values on a trigger can be useful in the case where you have a job that is stored in the scheduler for regular/repeated use by multiple triggers, yet with each independent triggering, you want to supply the job with different data inputs.
As a best practice, the code within the Job.execute( ) method should generally retrieve values from the JobDataMap on found on the JobExecutionContext, rather than directly from the one on the JobDetail.