Created
August 29, 2016 14:29
-
-
Save xurenlu/1722619d52f68ca8aca5aa5c620c7dab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var process = require('child_process'); | |
gulp.task('send', function(){ | |
process.exec('/home/x/bin/sendtokaifa', | |
function (error, stdout, stderr) { | |
if (error !== null) { | |
console.log('[send]exec error: ' + error); | |
}else{ | |
console.log("send finished"); | |
} | |
} | |
); | |
}); | |
// Rerun tasks whenever a file changes. | |
gulp.task('watch', function() { | |
gulp.watch("/var/log/php/php-error.log", ["send"]); | |
}); | |
gulp.task('default', ['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment