[GH-ISSUE #5686] [Feature]: Schedule node updates with timezone selection #3957

Open
opened 2026-10-31 20:36:09 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @RomanSergeev653 on GitHub (Jun 30, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5686

Currently, node updates can be started manually by pressing the update button. This works, but it does not allow choosing a better time for the update.

In many cases, the best time to update nodes is during low-traffic hours, for example at 03:00, when the number of active users is minimal. Updating immediately may interrupt active users or cause unnecessary downtime during peak usage.

Describe the solution you'd like

I would like to have an option to schedule node updates for a specific date and time instead of starting the update immediately.

For example, on the Nodes page, next to the existing update button, there could be an additional option such as:

  • Update now
  • Schedule update

When scheduling an update, the panel should allow selecting:

  • Target node or multiple nodes
  • Date and time
  • Timezone
  • Optional confirmation before scheduling

Timezone selection is important because the panel operator and the servers/nodes are often located in different timezones. For example, the admin may be in Europe/Berlin, while the node server may use UTC or another server-local timezone.

Ideally, the UI should clearly show which timezone is being used for the scheduled update, for example:

“Scheduled update: 03:00 Europe/Berlin”
or
“Scheduled update: 03:00 server local time”

It would also be useful to show the scheduled update status in the node list, with the ability to cancel or reschedule it before execution.

Alternatives you've considered

The current alternative is to manually log in to the panel at night and press the update button at the desired time.

Another possible workaround is using external cron jobs or scripts, but this requires additional manual setup, server access, and technical knowledge. It is also less convenient when managing multiple nodes from the panel.

Concrete use case

I manage multiple 3x-ui nodes. When a new update is available, I do not want to apply it immediately during active hours because users may be connected.

Instead, I want to schedule the update for 03:00, when the number of active users is usually minimal. Since my servers may be located in a different timezone than me, the panel should let me explicitly choose whether the scheduled time is based on my timezone, the panel timezone, or the server/node timezone.

This would make node maintenance safer and more predictable, especially for admins managing nodes in different countries or regions.

Mockups, screenshots, or examples

Example UI idea:

On the Nodes page:

Button:

  • Update now
  • Schedule update

Schedule update modal:

  • Node: Node-1
  • Date: 2026-07-01
  • Time: 03:00
  • Timezone: Europe/Berlin / UTC / Server local time
  • Confirm button: Schedule update

After scheduling, the node list could show:

Node-1
Scheduled update: 2026-07-01 03:00 Europe/Berlin
Actions: Cancel / Reschedule

Which parts of the panel would this affect?

Multi-node (sub-nodes)

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @RomanSergeev653 on GitHub (Jun 30, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5686 ### Is your feature request related to a problem? Currently, node updates can be started manually by pressing the update button. This works, but it does not allow choosing a better time for the update. In many cases, the best time to update nodes is during low-traffic hours, for example at 03:00, when the number of active users is minimal. Updating immediately may interrupt active users or cause unnecessary downtime during peak usage. ### Describe the solution you'd like I would like to have an option to schedule node updates for a specific date and time instead of starting the update immediately. For example, on the Nodes page, next to the existing update button, there could be an additional option such as: * Update now * Schedule update When scheduling an update, the panel should allow selecting: * Target node or multiple nodes * Date and time * Timezone * Optional confirmation before scheduling Timezone selection is important because the panel operator and the servers/nodes are often located in different timezones. For example, the admin may be in Europe/Berlin, while the node server may use UTC or another server-local timezone. Ideally, the UI should clearly show which timezone is being used for the scheduled update, for example: “Scheduled update: 03:00 Europe/Berlin” or “Scheduled update: 03:00 server local time” It would also be useful to show the scheduled update status in the node list, with the ability to cancel or reschedule it before execution. ### Alternatives you've considered The current alternative is to manually log in to the panel at night and press the update button at the desired time. Another possible workaround is using external cron jobs or scripts, but this requires additional manual setup, server access, and technical knowledge. It is also less convenient when managing multiple nodes from the panel. ### Concrete use case I manage multiple 3x-ui nodes. When a new update is available, I do not want to apply it immediately during active hours because users may be connected. Instead, I want to schedule the update for 03:00, when the number of active users is usually minimal. Since my servers may be located in a different timezone than me, the panel should let me explicitly choose whether the scheduled time is based on my timezone, the panel timezone, or the server/node timezone. This would make node maintenance safer and more predictable, especially for admins managing nodes in different countries or regions. ### Mockups, screenshots, or examples Example UI idea: On the Nodes page: Button: * Update now * Schedule update Schedule update modal: * Node: Node-1 * Date: 2026-07-01 * Time: 03:00 * Timezone: Europe/Berlin / UTC / Server local time * Confirm button: Schedule update After scheduling, the node list could show: Node-1 Scheduled update: 2026-07-01 03:00 Europe/Berlin Actions: Cancel / Reschedule ### Which parts of the panel would this affect? Multi-node (sub-nodes) ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 30, 2026):

This is a valid feature request with no existing implementation in the codebase. Here is what the code currently does and what building this feature would require.

Current state (confirmed in source)

The node update path is synchronous and immediate:

  • POST /panel/api/nodes/updatePanel in internal/web/controller/node.go:318 receives a list of node IDs and immediately calls NodeService.UpdatePanels (internal/web/service/node.go:642).
  • UpdatePanels iterates the given IDs, opens a gRPC connection to each reachable node, and calls remote.UpdatePanel(ctx, dev) — all within the HTTP request lifecycle.
  • The frontend invokes this from frontend/src/api/queries/useNodeMutations.ts:61 via a single button in frontend/src/pages/nodes/NodeList.tsx:252.

There is no deferred, queued, or time-based scheduling layer for node updates anywhere in the codebase. The cron job infrastructure in internal/web/job/ handles fixed-interval system tasks (heartbeat, traffic sync, etc.) but has no mechanism for user-defined one-off future executions.

What implementing this would require

This is a non-trivial addition that touches several layers:

  1. Persistence: A new ScheduledNodeUpdate table (or equivalent fields on the Node model) to store the target node IDs, the wall-clock execution time, the IANA timezone, and a status field (pending/running/done/cancelled). A migration in internal/database/db.go is required.
  2. Backend scheduler: Either a new cron job (polling internal/web/job/) or a time.AfterFunc approach that wakes up at the scheduled time, resolves the stored UTC timestamp, and calls NodeService.UpdatePanels. The timezone only affects how the time is presented in the UI — storage in UTC is standard.
  3. API: New endpoints (list schedules, create schedule, cancel/reschedule), each requiring a matching entry in frontend/src/pages/api-docs/endpoints.ts per the contribution rules.
  4. Frontend: A schedule modal on the Nodes page with date/time picker and timezone selector (Ant Design has DatePicker with timezone support via generatePicker), plus a status column in the node list.

Implementation notes for a contributor

  • Store and compare times in UTC internally; accept timezone from the user only for display and input parsing.
  • The IANA timezone list is available in Go via time/tzdata (embedded zone database, available since Go 1.15 with import _ "time/tzdata").
  • The "New Feature" and "PR welcomed" labels are available on this repo if a contributor opens a draft PR.
  • The contribution guide is in CONTRIBUTING.md; build and test requirements are in CLAUDE.md and Makefile (make verify is the full gate).

The request is clear and the use case is well-described. It is accepted as a backlog item; no clarification is needed.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4842970950 --> @github-actions[bot] commented on GitHub (Jun 30, 2026): This is a valid feature request with no existing implementation in the codebase. Here is what the code currently does and what building this feature would require. **Current state (confirmed in source)** The node update path is synchronous and immediate: - `POST /panel/api/nodes/updatePanel` in `internal/web/controller/node.go:318` receives a list of node IDs and immediately calls `NodeService.UpdatePanels` (`internal/web/service/node.go:642`). - `UpdatePanels` iterates the given IDs, opens a gRPC connection to each reachable node, and calls `remote.UpdatePanel(ctx, dev)` — all within the HTTP request lifecycle. - The frontend invokes this from `frontend/src/api/queries/useNodeMutations.ts:61` via a single button in `frontend/src/pages/nodes/NodeList.tsx:252`. There is no deferred, queued, or time-based scheduling layer for node updates anywhere in the codebase. The cron job infrastructure in `internal/web/job/` handles fixed-interval system tasks (heartbeat, traffic sync, etc.) but has no mechanism for user-defined one-off future executions. **What implementing this would require** This is a non-trivial addition that touches several layers: 1. **Persistence**: A new `ScheduledNodeUpdate` table (or equivalent fields on the `Node` model) to store the target node IDs, the wall-clock execution time, the IANA timezone, and a status field (pending/running/done/cancelled). A migration in `internal/database/db.go` is required. 2. **Backend scheduler**: Either a new cron job (polling `internal/web/job/`) or a time.AfterFunc approach that wakes up at the scheduled time, resolves the stored UTC timestamp, and calls `NodeService.UpdatePanels`. The timezone only affects how the time is presented in the UI — storage in UTC is standard. 3. **API**: New endpoints (list schedules, create schedule, cancel/reschedule), each requiring a matching entry in `frontend/src/pages/api-docs/endpoints.ts` per the contribution rules. 4. **Frontend**: A schedule modal on the Nodes page with date/time picker and timezone selector (Ant Design has `DatePicker` with timezone support via `generatePicker`), plus a status column in the node list. **Implementation notes for a contributor** - Store and compare times in UTC internally; accept timezone from the user only for display and input parsing. - The IANA timezone list is available in Go via `time/tzdata` (embedded zone database, available since Go 1.15 with `import _ "time/tzdata"`). - The `"New Feature"` and `"PR welcomed"` labels are available on this repo if a contributor opens a draft PR. - The contribution guide is in `CONTRIBUTING.md`; build and test requirements are in `CLAUDE.md` and `Makefile` (`make verify` is the full gate). The request is clear and the use case is well-described. It is accepted as a backlog item; no clarification is needed. *This reply was generated automatically; a maintainer may follow up.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3957
No description provided.