package de.nava.demo.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.scheduling.quartz.QuartzJobBean;

@Slf4j
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class MyJobTwo extends QuartzJobBean {

    public static final String COUNT = "count";

    private String name;

    protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
        JobDataMap dataMap = ctx.getJobDetail().getJobDataMap();
        int cnt = dataMap.getInt(COUNT);
        JobKey jobKey = ctx.getJobDetail().getKey();
        log.info("{}: {}: {}", jobKey, name, cnt);
        cnt++;
        dataMap.put(COUNT, cnt);
    }

    public void setName(String name) {
        this.name = name;
    }
} 
@@ -136,16 +136,92 @@
 bBean;%0A%0A
+import java.time.LocalDateTime;%0Aimport java.time.format.DateTimeFormatter;%0A%0A
 @Slf4j%0A@
@@ -745,24 +745,124 @@
 OUNT, cnt);%0A
+        dataMap.put(%22LAST_EXECUTION%22, LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME));%0A
     %7D%0A%0A    p

Store last execution time.