0

基本上我需要比每小时更频繁地运行 cron,但站点信息中的选项仅低至 1 小时。有没有办法绕过这个或添加更多选项让 cron 每 30 分钟自动运行一次?

我尝试使用poormanscron 模块文件在下面的函数中向数组添加更多内容,但它们似乎并没有采取任何措施。

function poormanscron_form_system_site_information_settings_alter(&$form, &$form_state) 
    {
      $form['cron_safe_threshold'] = array(
        '#type' => 'select',
        '#title' => t('Automatically run cron'),
        '#default_value' => variable_get('cron_safe_threshold', 10800),
        '#options' => array(0 => t('Never')) + drupal_map_assoc(array(1800, 3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
        '#description' => t('When enabled, the site will check whether cron has been run in the configured interval and automatically run it upon the next page request. For more information visit the <a href="@status-report-url">status report page</a>.', array('@status-report-url' => url('admin/reports/status'))),
      );
      $form['buttons'] += array('#weight' => 100);
      array_unshift($form['#submit'], 'poormanscron_site_information_settings_submit');
    }
4

0 回答 0