public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 2/5] jobs: pass scheduled run time to job plugins
Date: Mon,  2 Nov 2026 00:20:25 +0100	[thread overview]
Message-ID: <20261101232205.976807-3-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261101232205.976807-1-t.lamprecht@proxmox.com>

Job plugins only got the schedule, so they could not tell how late a
run actually starts, for example for a missed run repeated after the
node was down. Pass the time the run was scheduled for as well.

Existing plugins ignore the additional argument.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
 PVE/Jobs.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Jobs.pm b/PVE/Jobs.pm
index 22e947f9c..b33b52b57 100644
--- a/PVE/Jobs.pm
+++ b/PVE/Jobs.pm
@@ -326,7 +326,7 @@ sub run_jobs {
         if (starting_job($id, $type)) {
             PVE::Cluster::cfs_update();
 
-            my $upid = eval { $plugin->run($cfg, $id, $schedule) };
+            my $upid = eval { $plugin->run($cfg, $id, $schedule, $next_sync) };
             if (my $err = $@) {
                 warn $@ if $@;
                 started_job($id, $type, undef, $err);
-- 
2.47.3





  parent reply	other threads:[~2026-11-01 23:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 23:20 [PATCH guest-common,manager,docs 0/5] backup jobs: add a start window Thomas Lamprecht
2026-11-01 23:20 ` [PATCH guest-common 1/5] vzdump: add option to stop starting guest backups after a time window Thomas Lamprecht
2026-11-01 23:20 ` Thomas Lamprecht [this message]
2026-11-01 23:20 ` [PATCH manager 3/5] vzdump: honor start window for guest backups Thomas Lamprecht
2026-11-01 23:20 ` [PATCH manager 4/5] ui: backup job: add start window option Thomas Lamprecht
2026-11-01 23:20 ` [PATCH docs 5/5] vzdump: document the start window Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261101232205.976807-3-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal