Skip to content
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

How to setup timezone for auto restart? #5618

Open
trandinhthangv2 opened this issue Jun 7, 2023 · 3 comments
Open

How to setup timezone for auto restart? #5618

trandinhthangv2 opened this issue Jun 7, 2023 · 3 comments

Comments

@trandinhthangv2
Copy link

How to setup timezone for auto restart?

{
  apps: [
    {
      script: 'index.js',
      cron_restart: '30 22 * * *',
      env: {
        TZ: 'America/Los_Angeles',
      },
    },
  ],
};

I write code as above but not working

@KamranBiglari
Copy link

@trandinhthangv2 Did you find a way to set the timezone for cron_restart ?

@Vincent-SV
Copy link

Even documenting which time is used (I think it is the system time ?) would be a great improvement, I couldn't find anything on https://pm2.keymetrics.io/docs/usage/restart-strategies/

@mgiova
Copy link

mgiova commented Jul 31, 2024

I needed this option as well, so I implemented it in PR #5877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants