function scheduler_install in Scheduler 2.x
Same name and namespace in other branches
- 8 scheduler.install \scheduler_install()
- 5 scheduler.install \scheduler_install()
- 6 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();
}