Closed kekearif closed 4 years ago
It'd be helpful if you'd copy your crontab entry here.
A quirk that often affects cron jobs: The PATH
is much different from your regular PATH and contains only the bare minimum.
I suggest you create a super minimal vanilla puppeteer example and see if that causes issues with your cron setup.
It'd be helpful if you'd copy your crontab entry here.
A quirk that often affects cron jobs: The
PATH
is much different from your regular PATH and contains only the bare minimum.I suggest you create a super minimal vanilla puppeteer example and see if that causes issues with your cron setup.
crontab entry is just:
* * * * * node /home/kekearif/bot/bot.js
Does this look right?
This might be too minimal, try to cd
into that directory before and check your PATH
.
Pretty sure you'll have this issue with vanilla pptr as well, hence I'm closing this.
I am having a strange issue when attempting to run puppeteer with a cron job. Code as follows:
When I run the code in the terminal there are no issue however the code fails if run from a cron job. I printed the output of the cron job:
I've got no idea why it say it is missing if it works fine in the terminal. Looking at my
package.json
I have:I tried not using
puppeteer-extra
and just regularpuppeteer
but I get this error:Any ideas what I am doing wrong here? Any pointers would be greatly appreciated. thanks!