My CasperJS script never stops executing.
var casper = require(\'casper\').create(); casper.userAgent(\'Mozilla/5.0 (
Try adding exit on you run method.
casper.run(function() { this.exit(); });