In a developer site you typically want to disable certain jobs that are only useful in production. Would like to know, is there is a way to disable jobs in settings.php?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sumthief’s picture

Hello @ñull

There is already this possibility exists. Please look function elysia_cron_is_job_disabled() for details.

This function initially checks if variable with specific name exists than get value of this variable.
Schema which used to build this name is: 'ec_' . _ec_get_name($job) . '_d'; . Also you can see function _ec_get_name() to investigate how it build job name (Usually if you are using Drupal 7 version and cron name less than 120 symbols you can skip this moment).
For example you can use this construction in your settings.php:

$conf['ec_example_cron_name_d'] = TRUE;
sumthief’s picture

Status: Active » Needs review
FileSize
1.12 KB

Here is patch which updates API.txt file and describe how we can make it via settings.php.

kala4ek’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.