First pass in the parameters before running :
The getJobDataMap() method of the JobDetail class returns the value JobDataMap, on which the Map operation can be performed.
E.g:
job.getJobDataMap().put("love", "I love you very much!");
Second, get the parameters in the job :
In the execute method, pass in the context context as follows:
public void execute(JobExecutionContext context)
Then get the JobDataMap and get the required data from the Map. The sample code is as follows:
String jobName = context.getJobDetail().getName();
JobDataMap dataMap = context.getJobDetail (). GetJobDataMap ();
String strData = dataMap.getString("love");