Sure, you could guard it with a condition.
E.g. if you would like to call it every 100 iterations:
for epoch in range(epochs):
    for batch_idx, (data, target) in enumerate(data_loader):
        # Your training routine
        data = ...

        if (batch_idx+1) % 100 == 0:
            scheduler.step()