|
|
|
@ -115,8 +115,12 @@ exports.set_crontab = function(env_vars, callback){
|
|
|
|
|
|
|
|
|
|
fs.writeFile(exports.env_file, env_vars, function(err) { |
|
|
|
|
if (err) callback(err); |
|
|
|
|
|
|
|
|
|
fs.writeFile(path.join(cronPath, "crontab"), crontab_string, function(err) { |
|
|
|
|
// In docker we're running as the root user, so we need to write the file as root and not crontab
|
|
|
|
|
var fileName = "crontab" |
|
|
|
|
if(process.env.CRON_IN_DOCKER !== undefined) { |
|
|
|
|
fileName = "root" |
|
|
|
|
} |
|
|
|
|
fs.writeFile(path.join(cronPath, fileName), crontab_string, function(err) { |
|
|
|
|
if (err) return callback(err); |
|
|
|
|
/// In docker we're running crond using busybox implementation of crond
|
|
|
|
|
/// It is launched as part of the container startup process, so no need to run it again
|
|
|
|
|