E
E
EVOSandru62021-05-20 16:45:20
Node.js
EVOSandru6, 2021-05-20 16:45:20

How to run cron scheduller in pm2?

Hello guys, Tell me

what I'm doing wrong with pm2
For some reason, the parse script starts more often than in 15 minutes, does not reach the end, and starts writing to the same log file. And so in a circle.
How to make the script reach the end and the process is completed before the next cron iteration?

pm2 start "cd /var/www/site && make parse > data/logs/$(date +%F_%T).log" --name parseJob --cron "*/15 * * * *"


There is a small chance that he restarts, taking some signals from the puppeteer , but this is somehow strange.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question