keymetrics / pm2-plus-tech-questions

http://docs.keymetrics.io/docs/pages/faq-troubleshooting/
27 stars 3 forks source link

cron setup for auto run every 2 mins but terminating old process #306

Open rakesh4gvm opened 1 year ago

rakesh4gvm commented 1 year ago

0

I have implemented cron in nodejs and express js and try to setup in pm2 for running every 2 mins but the issue is when starting new execution previous started execution is auto terminate I want to keep all execution running

pm2 start adddata.js --cron "/2 *"

1st execution 12:00 AM

2nd execution 12:02 AM

3rd execution 12:04 AM

When start 2nd execution then 1st execution auto terminate when start 3rd execution then 2nd execution auto terminate

I want to keep running all execution until execution done Please suggest me how can achieve my requirement

App built : nodejs and expressjs

Os: amazon-linux