When using quartz, I want to execute jobDetail at an interval of 6000 each time. How can I modify it?


public class MyJobTest {

    public static void main(String[] args) throws SchedulerException,
            ParseException {
        startSchedule();
        //resumeJob();
    }
    /**
     * simpleSchedule()
     */
    public static void startSchedule() {
        try {
            // 1JobDetailQuartz
            JobDetail jobDetail = JobBuilder.newJob(MyJob.class)
                    // 
                    .withIdentity("job1_1", "jGroup1")
                    // 
                    .build();

            //
            SimpleScheduleBuilder builder = SimpleScheduleBuilder
                    // 
                    .repeatSecondlyForTotalCount(5);

            //CronScheduleBuilder builder = CronScheduleBuilder.cronSchedule("0/2 * * * * ?");
            // 2Trigger
            Trigger trigger = TriggerBuilder.newTrigger()
                    .withIdentity("trigger1_1", "tGroup1").startNow()
                    .withSchedule(builder)
                    .build();

            // 3Scheduler
            Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
            scheduler.start();
            // 4
            scheduler.scheduleJob(jobDetail, trigger);
            try {
                System.out.print(" 60000\n");
                Thread.sleep(60000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            //
            scheduler.shutdown();

        } catch (SchedulerException e) {
            e.printStackTrace();
        }
    }


}
Mar.02,2021

6000 seconds?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf8411-46670.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf8411-46670.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?