I don't think there's a set time, but you're more likely to get
eggs if they match perfectly. I don't think they'll breed if it
says they'd rather play with other pokemon but I'm not 100% sure.
The more they get along the higher the chance
You can check it in the wiki! The more compatible your breeding pairs are the
more eggs produced increase. Like @CutePikaEevee said, you have to
give money at least above 50 pokedollars, if not then they will not
produce any eggs.
"We must raise our hearts, not our voices. It is rain
that makes the flowers grow, not thunder." - The Breadwinner
(2017)