diff --git a/src/scheduler.js b/src/scheduler.js index ae87bfc77..290e294e9 100644 --- a/src/scheduler.js +++ b/src/scheduler.js @@ -76,10 +76,10 @@ function createJobs(app, schedulerConfig, callback) { // stopJobs only deletes jobs since previous run. This means that when box code restarts, none of the containers // are removed. The deleteContainer here ensures we re-create the cron containers with the latest config docker.deleteContainer(containerName, function ( /* ignoredError */) { - docker.createSubcontainer(app, containerName, [ '/bin/sh', '-c', cmd ], { } /* options */, function (error, container) { + docker.createSubcontainer(app, containerName, [ '/bin/sh', '-c', cmd ], { } /* options */, function (error) { if (error && error.reason !== BoxError.ALREADY_EXISTS) return iteratorDone(error); - debug(`createJobs: ${taskName} (${app.fqdn}) will run in container ${container.id}`); + debug(`createJobs: ${taskName} (${app.fqdn}) will run in container ${containerName}`); var cronJob = new CronJob({ cronTime: cronTime, // at this point, the pattern has been validated