You can set the end date of your petition when you create it.  You can declare 'victory' or end your petition any time.  The default petition duration is 180 days.