Add Recurring Task in MS Project using Python

This short guide explains how to add recurring task in MS Project using Python. It shares details on setting up the IDE, a list of programming steps, and sample code for demonstrating how to make recurring task in Microsoft Project using Python. Various properties can be set to customize the recurring task and generate the desired output MPP file.

Steps for Microsoft Project Repeating Tasks using Python

  1. Set the environment to use Aspose.Tasks for Python via .NET for using recurring tasks
  2. Apply the product license, load the existing project, and create a new recurring task
  3. Set each task duration, define a weekly repetition pattern, and set the desired weekdays in it
  4. Set the total duration of recurring tasks by defining the start and end dates
  5. Define the WeeklyRecurrencePattern object and set the above-defined repetition and recurrence range
  6. Set this recurrence pattern to the recurring task and link the task with the standard calendar of the project
  7. Add the task as a child task to the desired task in the loaded project
  8. Save the resultant project as an MPP file
  9. Read the project to confirm the existence of the recurring task

These steps summarize the process to make recurring task in Microsoft Project using Python. Load the license, open the source MPP file into the Project object, create a recurring task with the RecurringTaskParameters class, add weekly repetition, define recurrence range, and create a WeeklyRecurrencePattern object with the above parameters. Link a calendar to the task, add it to the desired task in the project, and save it as an MPP file.

Code to Make a Task Recurring in MS Project 2016 using Python

This code assists in working with recurring task in MS Project. You may use EndAfterRecurrenceRange to end tasks after a fixed number of occurrences. The occurrences can be extended beyond weekly by utilizing the daily, monthly, or yearly options, as per the requirements.

This article has taught us the process to generate recurring tasks. To open an XER file using Primavera, refer to the article Open XER File in Python.