code: @Transactional
      protected void _setServiceEnabled(boolean enabled) {
          synchronized (_serviceManagementRecordService) {
              ServiceManagementRecord record = _serviceManagementRecordService.findServiceManagementRecord(Service.SCHEDULING);
  
              if (record == null) {
                  record = new ServiceManagementRecord(_userService.findAdminUser(), Service.SCHEDULING, enabled);
              }
              record.setEnabled(enabled);
              _serviceManagementRecordService.updateServiceManagementRecord(record);
          }
      }
docs: Enables the scheduling service.
  
  @param  enabled  True to enable, false to disable.