Jesse – this appears to be an old issue. However, I'm finding a few issues with Jenkins and the queue persistence. Particularly on Windows.
- If you run Jenkins as a service then you restart the service (as opposed to telling Jenkins to exit) then there is no queue.xml created and the build queue is therefore lost.
- Prior situation means that if the machine is rebooted – we would probably lose the queue.
- Even more interesting – it appears that your fix somehow isn't working for /safeRestart or /restart. It is like /exit (which does save the queue.xml) is actually safer than /safeRestart.
Considering all things – why don't we simply write queue.xml to the disk on every queue change? With today's HDD and SSD's – I'd think for most servers Jenkins is running on – the cost of doing so should be minimal. Compared to the writing of build logs to disk this is practically nothing. At least, why not make it an option to continuously persist the build queue (if so, then I'd think it should be on by default).
https://github.com/jenkinsci/jenkins/pull/1865