You should probably use the absolute path to your casper script, something like:
30 9 * * * /usr/local/bin/casperjs /absolute/path/to/lib/fsaupload.js arg1 arg2 arg3
My two cents.
Edit:
Well, that was a little stupid. You can also set your own path to the phantomjs
by setting the environment variable PHANTOMJS_EXECUTABLE
:
$ export PHANTOMJS_EXECUTABLE="/path/to/phantomjs"
Then run your script as usual:
/usr/local/bin/casperjs /absolute/path/to/lib/fsaupload.js arg1 arg2 arg3
Tip. If your crontab is running as a different user, make sure that he has access to the phantomjs path.
Hope this helps (and works).
Change again
Wait, the stack trace says that you are using an old version of CasperJS (for example, the subprocess
module is no longer used). Try a newer version :)
Niko source share