Error Batch Job does not exist


Batch Job executions is ok until the doStrart area. When it arrives to job.scheduleBatches(batches) …

“id” : “5249.1932”,
“codes” : [ “NotClassified” ],
“key” : “c3.engine.database.async.JobBaseMethods_runDoesNotExist”,
“template” : “Job run {}:{}:{} does not exist”,
“parameters” : [ “MeasurementSeriesRepairBatchJob”, “6716f7a8-0456-4404-854e-0d1060da9b25”, “” ]



Where do you see this error? Can you share the definition of your job and how you’re trying to launch it?



type MeasurementSeriesRepairBatchJob extends BatchJob<MeasurementSeriesRepairBatchJob,MeasurementSeriesRepairJobConfig,MeasurementSeriesRepairJobOptions> type key 'MRJ'{
    doStart:      ~ js server
    processBatch: ~ js server
    allComplete:  ~ js server


type MeasurementSeriesRepairJobConfig {
   id: string


type MeasurementSeriesRepairJobOptions {
   id : string
   name : string
   Type : string


var log = C3.logger('MeasurementSeriesRepairBatchJob');

function doStart(job, targets) {'MeasurementSeriesRepairBatchJob start');
    var result = new Array();


    var measers = Measurement.evaluate({
        projection: "unique(",
        limit: -1

    for (var i = 0; i < measers.tuples.length; i++) {
        var gipsy = PhysicalMeasurementSeries.get(measers.tuples[i].cells[0].str);
        if (gipsy == undefined) {
            result.push([measers.tuples[i].cells[0].str, 'd']);


//code, code code .......

//final function"Result: "+result.toString());

  //RESULT EXAMPLE    result= [[IT002E9062399A,d],[AS_ACW_DIRNS_ISOIL_ML311_V2_2D539B_TE_H,r]];  

    var batches =, function (name) {"name_first: "+name[0].toString()+" type: "+name[1].toString());
       // return MeasurementSeriesRepairJobOptions.make({id: name[0].toString(), name: name[0].toString(), Type: name[1].toString() });
           // name: name[0],
            //Type: name[1]
            return { name: name[0] };
    });"batches: "+batches);
    job.scheduleBatches(batches);    //ERROR IS HERE

function processBatch(batch,job,options) {
        'processBatch ({}, {}, {})', JSON.stringify(batch), JSON.stringify(job), JSON.stringify(options));
        var name =;
        var type = batch.Type;"name: "+name.toString());
        var orph = Measurement.fetch({
            filter: '"' + name + '"',
            limit: -1

//code code code ....


i found few documents about BatchJob i hope everything is correct


ops :slight_smile:

var job = MeasurementSeriesRepairBatchJob.make().upsert();

Uncaught C3.client.ActionError {name: “ActionError”, message: “Job run MeasurementSeriesRepairBatchJob:684843da-4fe3-419b-aaaa-937478b4e351: does not exist”, error: C3.t…s.Obj, stack: “Error: Job run MeasurementSeriesRepairBatchJob:684…961:20), :5:8)↵ at :1:33”}


the job.scheduleBatches parameter what type of object must be ?


From the documentation:

scheduleBatches(batches) member

  batches: [ BT ]

In your case it’s an array of MeasurementSeriesRepairJobOptions


This is because you are calling doStart() instead of start(). The documentation for doStart states:

//This is the starting point of your batch job. This function will be invoked first by the batch engine.
//In this function, write logic to create & schedule batches {@link BatchJob#scheduleBatch}
// that should be distributed across the cluster.

Note that it is invoked by the batch engine and you implement it to do the right thing.

The start() function, however says:

//Starts the job with the supplied options.

So that is what you need to call to start the job.


Thank you very much, it works