Create a Custom field (e.g.
new_taskreminder
) on Contract Entity to store date to execute workflow.Populate the newly created field with (ContractEndDate - 1 Week). You can write a plugin to populate the field or Contracts are only created using CRM UI then you can write javascript as well.
Create a new Workflow and add the wait condition as below:
Instead of Contract End Date, select the newly created field.
Under the condition, create new record. Select task from dropdown. Set the properties as you want to assign the task to someone.
Final workflow will look like this: Activate the workflow to make affect.
UPDATE
NOTE: If you want to run workflow on fixed 7 days before ContractEndDate. You don't need to create or populate custom field. You can write the wait condition as below: But if you want to calculate the weekdays and holidays, then good to write a plugin or custom workflow activity.
I hope it will help you.