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
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