What's up man,
I have a 09 that has had every kind of electrical issue you can imagine. I'm sure you probably checked this first, but last time my car did that, the battery was short on juice. Try hitting the lock button on your key fob twice and see how the horn sounds when it locks up. If it's higher pitched, or just weaker than normal, my bet is the battery is not full or you have a drain on it. On the other hand, bl817 could also be right; the Smart Junction Box is responsible for a lot of stuff like that. If the issue is the SJB, I'd take it to a pro.. I'm by no means a electrical expert, but I'm also not a complete idiot. However, messing with the SJB was way over my head.
Another thing that might help diagnose the problem: have you done any electrical work recently? Like installed a sound system, head unit, wired fog lights? The reason I asked is because in my younger and more foolish days I wired my stereo in as always hot and essentially it never turned off, even when the car was off. It sucked the battery dry in a matter of 2-3 days without fail, and the chime and horn did the exact same thing yours is doing before the battery fully died.
Anyhow, hope this helps you out!!
09 Mustang 4.0. Too much to write down. Looks and sounds like a GT500 for half the cost and a quarter of the horsepower!! Currently working on a junkyard turbo build and an 8.8 rear end swap.