Nightmare JS navigation error -3 every 1st run of the day

Viewed 16

I have a Nightmare JS script that is scheduled to run 4 times a day from 8am - 8pm. The script is scraping a website, the 1st part of which is scraping links from the 1st page.

Now the 1st time it loads every day, regardless of whether it is launched by Task Scheduler or if I manually run it, it throws the Navigation Error -3 and then stalls. It only does it on the 1st run of the day and it happens every day. If I then end the task and restart it immediately runs fine and does so for the remainder of the day.

I have 2 questions;

Does anyone have an idea why it may be happening, and how I can prevent it?

If not, any ideas how I can get it to stop and restart itself when this error occurs?

Cheers All

0 Answers
Related