When developing ElasticJob-Cloud jobs, developers can leave the Mesos environment to run and debug jobs locally. The local operating mode can be used to fully debug business functions and unit tests, and then deploy to the Mesos cluster after completion.

    There is no need to install the Mesos environment to run jobs locally.

    1. // Create job configuration
    2. JobConfiguration jobConfig = JobConfiguration.newBuilder("myJob", 3).cron("0/5 * * * * ?").build();
    3. // Configure the fragmentation item of the currently running job
    4. int shardingItem = 0;
    5. // Create a local executor
    6. new LocalTaskExecutor(new MyJob(), jobConfig, shardingItem).execute();