Hi all,
I have a nodejs script which fetches an xml file from a web server, parses it, then stores some data in a mongodb database. When I run it at the command line, it works fine 100% of the time. However, when I run it as a cron job, it throws an exception partway through. I redirect stderr to error.txt and I get the following error.txt:
events.js:48
throw arguments[1]; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:670:11)
at Object.afterWrite [as oncomplete] (net.js:503:19)
Could someone point me in the right direction to fix this?
Thanks,
Jacob