Replies: 2 comments 1 reply
-
Very interesting, the terminte option seem more flexible than a cron_restart feature 👍 Cron-terminate wouldn't interfere with overrun. Overrun only block starts when a process is already running. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Implemented in 1.0.0-beta.13 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pm2 has this option
cron_restart
which takes a cron pattern to restart your process.At first I thought we could do the same, but then I thought: what if we had a
terminate
option instead? I think it would be more flexible.terminate: 0 0 * * *
cron: 0 6 * * *,
terminate: 0 22 * * *
cron: * * * * 5,
terminate: * * * * 6
Maybe the options names should be changed in that case.
That would allow manually scaling your processes. For example, if you know you have more users on friday, you could schedule an extra cluster for fridays.
Another use case for example would be an email service that you don't want to run late at night.
Cron restart would be useful for me because I have broken, legacy programs that need to be restarted everyday.
Not sure how
terminate
would work withoverrun
, though.Beta Was this translation helpful? Give feedback.
All reactions