So it would appear the 24 hour rule applies to things like routine maintenance issues. At least they chose to show up when you weren't at home.
Quote
The landlord shall not abuse the right of access or use it to harass the tenant. Except in case of emergency or if it is impractical to do so, the landlord shall give the tenant notice of his intent to enter and may enter only at reasonable times.
No doubt it was impractical to do so in your case... :)
I have been around apartment complexes for years, and usually the management would send out notices when routine maintenance would be occurring, and they would leave a notice when they came indicating the work they performed. If they needed to check something out that required immediate attention they would usually just go and do it and make sure to leave the notice in case there was a problem.