You may need to "show" them where to perch, if you don't want them perching on the ledge. Start by temporarily blocking off the ledge somehow. After dark, go and move them from the ledge to the perch. If they hop down, put them back on the perch (if it's dark enough, the may not hop down)...