Depending what type of barn we're talking about. It it was an older pine barn I'd either dry them for three months or put them right up. On a finished pine sided barn with insulation and fininshed on the inside I'd let it dry for at least three months or you might end up with mold. That's assuming by drying we both mean stickered outside and covered from the weather. The battens should stay off for a while let the boards dry on the wall.
For white oak I'd definatly wait for at least 6 months. I put some green on my barn and there are some places where it dried more than an inch. I wouldn't use red oak on a barn.
"Rule of Thumb" is one year per inch of thickness for freshly felled and milled lumber. That's stored under cover protected from direct sunlight, preferably indoors. Why would you purchase green lumber for siding if you only need a "few' boards? You'll have much better luck with kiln dried boards that wide.