Getting objects to rotate back and forth

I have an animation with leaves falling in front of the screen. I need the leaves to rock back and forth as they descend. Let’s say rocking backing and forth 20 to 40 degrees each way. I realize that this would be accomplished with _rotation and then saying something along the lines of if less than twenty but greater than 0… with some kind of switch when it either 20 or -20 to reverse the direction, but I am unsure how these pieces come together. Any help would be great.

Thanks guys in advance.