So, I'm trying to run casperJS as a cron job on my server, this is crontab:
* * * * * /usr/local/bin/casperjs /var/www/javascript/uat/prime.sh 2>&1
This is simple.sh
#!/bin/bash
export PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs
/usr/local/bin/casperjs /var/www/javascript/uat/prime.js 2>&1
I also added the export to users' .bash_profile file, but cron sent me an email with
Fatal: [Errno 2] No such file or directory; did you install phantomjs?
Not sure what else to do! Any tips?
source
share