Please use the blockcode tags when you include code snippets.
No Activiti will not restart the task by default, so there must be something wrong here. Having said that a task that runs for weeks/months is not something that Activiti should manage, because that will also keep the transaction started by the job executor open. It would be better to implement that logic in Camel, Spring Integration or Mule and use a receive task in the process definition that can be signalled when the long running task is completed.
Best regards,