Unitech / Unitech/pm2

How to setup timezone for auto restart?

Open
#5,618 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing PM2's cron_restart scheduling and timezone handling, then reproduce the reported behavior with the ecosystem configuration shown in the issue. Done means the timezone behavior is clearly verified and either corrected or documented with a working configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.