I'm building a fence with horizontal slats made from cedar with pine posts. The posts have dados cut into them and I'm planning to slide the slats down the dado and affix them to the post using a pocket screw jig with decking screws. The slats will be 10 feet long with a quarter inch spacing between each. What I want to know is if the slats are too long such that they will sag in the middle and what I should do to prevent this short of just making shorter fence panels. Thanks in advance.
If you are using 1X4X10 horizontally, you may notice a bit of sag over time. The wider the board, the less likely it will sag. 1X8 would be a good choice, but if you think you are going to keep a consistent 1/4" gap across all boards, that will not happen. Not all the boards will be straight to begin with, and when moisture gets introduced into the mix of things, there is no way to predict what will happen with a gap that may be good at the time of install.
assuming you mean they boards are horizontal but oriented vertically, as any reasonable everyday fence would be...
a 10" board isn't going to sag vertically due to gravity acting straight down against it in the vertical direction, but will probably soon "sag" horizontally-- that is, warp and come out of the plane of the fence wall (imagine the whole fence laid down flat against the earth, but only supported by blocks under the posts). Once even a slight warping happens, now the board is no longer vertically flat and gravity will act against those horizontal mass vector components.
even if no vertical sag occurs, boards out of plane are going to LOOK really lame, and possibly defeat your purpose of building a fence (blocking light [privacy], or blocking wind, or preventing human/animal movement)
consider: wind pressure against this fence, snow drifts, kids balls (any force pushing horizontally against the finished fence boards). A fence is a giant sailboat sail and snowdrift-wall; forces can be considerable over such a large surface area. Also depends on the wood, its quality (bend strength), and the weatherproofing finish applied if any (how likely/resistant the boards are to bend).
solution: try vertical struts (say, 1x3s) binding all boards together every 3 feet); this turns a bunch of 1"x10's into a single 8 FOOT by 10' PANEL, which has internal structural integrity against individual warping (individual boards can't warp [much] when bound to its neighboring boards). The whole PANEL might warp in or out, but somewhat less likely (use the below T solution on the panel as a whole). Again, consider wind, snow, child sideways forces on the whole panel.
other solutions: use thicker boards. Or more frequent posts. Or a bracing reinforcement strip (say, 1.5x1.5) glued/nailed behind the length of each board (i.e. to turn them into sideways T-beams).
study how steel I-beams work (and why they are as strong as a solid steel rod)