If you want to test or create cron pattern, I found the website crontab.guru/ really useful.
beware if you use pm2 with multiples instances : your cron will be launched multiple times and you don't always want that.
To circumvent this, just use the env var that pm2 injects int the process.env :
if (
process.env.NODE_APP_INSTANCE === '0'
) {
// init your cron here...
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello,
If you want to test or create cron pattern, I found the website crontab.guru/ really useful.
beware if you use pm2 with multiples instances : your cron will be launched multiple times and you don't always want that.
To circumvent this, just use the env var that pm2 injects int the process.env :