def METHOD_NAME(schedule_pk):
    from apps.schedules.models import OnCallSchedule
    task_logger.info(f"Refresh ical files for schedule {schedule_pk}")
    try:
        schedule = OnCallSchedule.objects.get(pk=schedule_pk)
    except OnCallSchedule.DoesNotExist:
        task_logger.info(f"Tried to refresh non-existing schedule {schedule_pk}")
        return
    schedule.METHOD_NAME()
    if schedule.channel is not None:
        notify_ical_schedule_shift.apply_async((schedule.pk,))
    run_task_primary = False
    if schedule.cached_ical_file_primary:
        # ie. primary schedule is not empty (None -> no ical, "" -> empty cached value)
        if not schedule.prev_ical_file_primary:
            # prev value is empty
            run_task_primary = True
            task_logger.info(f"run_task_primary {schedule_pk} {run_task_primary} prev_ical_file_primary is None")
        else:
            # prev value is not empty, we need to compare
            run_task_primary = not is_icals_equal(
                schedule.cached_ical_file_primary,
                schedule.prev_ical_file_primary,
            )
            task_logger.info(f"run_task_primary {schedule_pk} {run_task_primary} icals not equal")
    run_task_overrides = False
    if schedule.cached_ical_file_overrides:
        # ie. overrides schedule is not empty (None -> no ical, "" -> empty cached value)
        if not schedule.prev_ical_file_overrides:
            # prev value is empty
            run_task_overrides = True
            task_logger.info(f"run_task_overrides {schedule_pk} {run_task_primary} prev_ical_file_overrides is None")
        else:
            # prev value is not empty, we need to compare
            run_task_overrides = not is_icals_equal(
                schedule.cached_ical_file_overrides,
                schedule.prev_ical_file_overrides,
            )
            task_logger.info(f"run_task_overrides {schedule_pk} {run_task_primary} icals not equal")
    run_task = run_task_primary or run_task_overrides
    if run_task:
        notify_about_empty_shifts_in_schedule.apply_async((schedule_pk,))
        notify_about_gaps_in_schedule.apply_async((schedule_pk,))