ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
34 stars 2 forks source link

Pausing scripts by editing the schedules.ps1 does not pause the jobs in Hangfire #3450

Closed realslacker closed 1 month ago

realslacker commented 1 month ago

Version

4.3.2

Severity

Low

Environment

msi

Steps to Reproduce

My environment is a 2-node setup with SQL persistence. Both nodes are running 4.3.2, however I believe I have seen this issue as far back as the early 4.x releases.

To reproduce the issue:

  1. put both nodes in maintenance mode
  2. stop the PSU service on both nodes
  3. edit the schedules.ps1 in the Git repo adding Pause = $true on the schedule
  4. restart the PSU service causing the schedules.ps1 to be read
  5. observe that the schedule shows as paused in the GUI
  6. exit maintenance mode
  7. jobs will begin to run
  8. observe that the jobs are scheduled in hangfire

Expected behavior

Pausing jobs in the schedules.ps1 prevents the jobs from running once the new configuration is loaded

Actual behavior

Pausing jobs in the schedules.ps1 does not remove scheduled jobs from the hangfire queue

Additional Environment data

No response

Screenshots/Animations

No response

realslacker commented 1 month ago

This issue might be explained by #3458