How to auto-complete a project?

I have projects that will be completed by a specific date (their due date) regardless of the status of the tasks they contain.

Is it possible to do one of the following? Set a project level task that completes the project when

  1. it reaches its due date or
  2. all the tasks in the project are marked as complete?