You are here

function scheduler_install in Scheduler 8

Same name and namespace in other branches
  1. 5 scheduler.install \scheduler_install()
  2. 6 scheduler.install \scheduler_install()
  3. 2.x scheduler.install \scheduler_install()

Implements hook_install().

File

./scheduler.install, line 74
Installation file for Scheduler module.

Code

function scheduler_install() {

  // Set cron access key value, as this is now required in SchedulerCronForm.
  $config = \Drupal::service('config.factory')
    ->getEditable('scheduler.settings');
  $config
    ->set('lightweight_cron_access_key', substr(md5(rand()), 0, 20))
    ->save();
}