Yes it is possible and relatively easy. With knowing what fields you have in your base, I will use generic field names.
Assuming you have a field called contract end date of type date.
I would create a formula field that determines the number of days left till the end of the contract.
IF(DATETIME_DIFF({Contract End Date}, TODAY(), 'days')<30, 'Needs Renewing', 'Good')
Then create an automation that runs 1x per day that find the records that need renewing. In that automation create the tasks you want to automate.
You could also simplify this by using a task template, but I haven't addressed that here.
I've created a sample base that you can use to base your automations off of