Knowing when to train or rest is challenging, especially when your job demands you to be physically fit at all times. What if you have a knee injury? In most cases, you have to push through even when you are in pain while trying your best to avoid a full-blown injury. With this, you have to make some temporary changes in your training to stay active. For example, you can lift weights instead of doing squats, lunges, and other knee-bending exercises, or they can replace swimming with fins. If you can’t really handle the pain, then give yourself some rest.
Source: https://www.military.com/military-fitness/how-keep-your-leg-days-when-you-have-knee-injury