Vulnerability Scan will not start while scanner is in 'system restart required' state

Is this a known behavior for Ubuntu 20.04 LTS VM scanners? Scheduled vulnerability scans will kick off and immediately fail with the message “Scan engine is offline or unavailable”. Upon a closer look the VM was in a ‘system restart required’ state due to pending kernel updates.

I’m going to create a cron job to restart if the VM is in this state, but is there a way to query the console or the linux VM to see if there is an upcoming scheduled scan? Can you set the job to check for a nexpose service that indicates theres an active scan? If so what service?

Otherwise I can just review our scan schedule and setup a daily job and hope the updates aren’t applied right before a scan.

You can use the API to see upcoming scan times, not entirely sure off the top of my head if there’s a value for “current scans” but I feel like that probably exists as well.
https://help.rapid7.com/insightvm/en-us/api/index.html#