Is this legal?? Advice needed!

So today me and my so were sleeping in our apartment after working very hard just a few hours before, I heard a few knocks at the door but I honestly didn’t really pay much attention because we were SO exhausted! Next thing I know my landlord is using her key to BARGE INTO OUR APARTMENT!!! luckily for me I have video footage because I recently purchased a security camera, my main question would be is this legal to do?? Can they really go into your apartment for non emergency visits with no notice whatsoever??

I found out later that they were going in the apartment to do a routine extermination, which is absolutely not an emergency and I could have at least gotten notice of the situation first

Edit: there is no community bulletin board or anything like that. They are very shady so I guess this shouldn’t surprise me.

I also live in pa