Use the --cron option:
-c –cron
<cron_pattern>
For example:
pm2 start sendMail.js --cron "*/15 * * * *"
Pm2 will now restart the sendMail.js script on the hour, and at 15, 30 and 45 minutes past the hour
Use the --cron option:
-c –cron
<cron_pattern>
For example:
pm2 start sendMail.js --cron "*/15 * * * *"
Pm2 will now restart the sendMail.js script on the hour, and at 15, 30 and 45 minutes past the hour