Crontab is not working with .js script to put the scraping data into the database

Viewed 20

I am using this command to run the scraper and load the data into the database, the command is manually working and also in crontab while I checked in through the logs but the data is not going into the database.

Commands:

*/5 * * * * su scrapers -c "cd /home/scrapers/data-sources && /home/scrapers/.nvm/nvm-exec yarn workspace ma-be-mer node index.js"

I also put the node location and cron execute the command as I check through logs but still the data is not going into the database.

*/2 * * * * su scrapers -c "cd /home/scrapers/data-sources && /home/scrapers/.nvm/versions/node/v16.15.0/bin/node/nvm-exec yarn workspace ma-be-mer node index.js"

checking through this: sudo grep CRON /var/log/syslog

0 Answers
Related