1 system.install system_update_1012()

Convert cron settings to use configuration files.

Related topics

File

core/modules/system/system.install, line 1854
Install, update and uninstall functions for the system module.

Code

function system_update_1012() {
  // Migrate the variable settings.
  $config = config('system.core');
  $config->set('cron_threshold_warning', update_variable_get('cron_threshold_warning', 172800));
  $config->set('cron_safe_threshold', update_variable_get('cron_safe_threshold', 10800));
  $config->set('cron_max_threshold', update_variable_get('cron_max_threshold', 10800));
  $config->set('cron_threshold_error', update_variable_get('cron_threshold_error', 1209600));
  $config->save();

  // Delete variables.
  update_variable_del('cron_threshold_warning');
  update_variable_del('cron_safe_threshold');
  update_variable_del('cron_max_threshold');
  update_variable_del('cron_threshold_error');
}