A fixed price is best for jobs where the scope and timeframe are well-defined.
An hourly rate is best for ongoing work or jobs where the scope and timeframe are flexible.