Rebuilding partitioned table clustered indexes
Partitions can be rebuilt individually.  This allows you to interrupt the rebuild and preserve the work already done. The rebuild can be resumed later after the previously completed partition number.  Below is an example of this technique, where the @PartitonNumber value can be changed in a restart scenario.

DECLARE
      @PartitionNumber int = 1 --specify start partition number
    , @EndPartitionNumber int;

--get last partition number
SELECT @EndPartitionNumber = MAX(p.partition_number)
FROM sys.indexes AS i
JOIN sys.partitions AS p ON
    p.object_id = i.object_id
    AND p.index_id = i.index_id
WHERE
    i.object_id = OBJECT_ID(N'dbo.YourTable', 'U')
    AND i.name = N'YourIndexName'; 

--rebuild each partition individually    
WHILE @PartitionNumber &lt;= @EndPartitionNumber
BEGIN

    RAISERROR('Rebuilding partition %d', 0, 0, @PartitionNumber) WITH NOWAIT;

    ALTER INDEX [YourIndexName]
        ON [dbo].[YourTable]
        REBUILD Partition = @PartitionNumber;
        --WITH(ONLINE=ON); --specify desired online mode in SQL 2014 and later

    RAISERROR('Partition %d rebuild completed', 0, 0, @PartitionNumber) WITH NOWAIT;

    SET @PartitionNumber += 1;

END;
GO