it depends on what do you want to achieve: for stacking such photos to create star trails for example, you should use as long exposures as possible. but on the other hand, if you want smooth animation, you will need a lot of images, and that means shorter exposure times. shorter exposure means lower light, so you need your lens wide open, and maybe even iso increased.
one problem with the moon is that it is extremely bright compared to stars, so you have to decide: overburned moon, clear stars, or clear moon, dimmed stars. (or maybe try hdr with that? hm... never thought of that).
i myself have done such animation some time ago, you can see it here:
(why duplicated? is that forum error?)