-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pm2 start (at time) #5776
Comments
The cron argument is only for restart strategies and not for starting strategies so this will not work. My suggestion is to use the OS's cron to schedule the launch of your script. |
I'm going through the issues to find mentions about not auto-starting a new process, which I now created a PR for: |
Feature landed Update PM2 to 5.4.0 $ npm install pm2@5.4.0 -g
$ pm2 update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
This is my situation.
pm2 start node --name sessioni_approvate -- /root/nodejs_sessioneapprovate/sessioni_approvate.js --cron "0 20 8 * * 1,2,3,4,5,6"
i need to reload this "js" app every day expect sunday at 8:20 am.
the app performs a series of checks, writes some things and then the browser closes waiting for the new execution.
However, if I restarted the machine, to be able to start the app again, I have to issue that command.
I don't want that when I give that command, the app runs and then waits for the cron event.
I would like to issue the command but the first execution must be at the cron event. It's possible?
The text was updated successfully, but these errors were encountered: