Progesterone questions

I have progesterone pills. There take 2 capsules by mouth every evening. How long do I take them? Until I start my period? Or until there gone? And btw is it okay to take if just spotting? My cycle has been werid so I was gunna take progesterone to make it start all the way? I have been spotting on and off for almost a month?