There are certain cron tasks that I want to run on the production version of my site but not the development version. (ping_cron, for example, of xmlsitemap_engines_cron.) My initial thought was that I could override the appropriate variables in my dev site settings.php, but I'm not having any success. I tried this:

<?php
$conf = array(
  'ec_acquia_agent_cron_d' => "1",
  'ec_ping_cron_d' => "1",
  'ec_xmlsitemap_engines_cron_d' => "1",
}

I can confirm both with a Drush variable_get and a dpm(variable_get()) in my theme that the variables are getting set, but when I navigate to the Elysia Cron settings screen at admin/build/cron/settings the corresponding jobs aren't disabled, and when I run cron they seem to actually fire. Am I doing something wrong? Is this a bug in the module? Please let me know how I can help. Thanks!

Comments

gotheric’s picture

Assigned: Unassigned » gotheric

You are using the right form and it should work. I often use that way to disable jobs or change cron rules in my sites.
So i don't know why is not working... maybe a bug with D6 (i use it with D5).

I'll made a test with D6 on monday and i'll let you know.

gotheric’s picture

Status: Active » Fixed

I've tested it, and you're right: with 6.x stable version of elysia cron you cannot override $conf that way.

But there are 2 easy solutions:

1. After setting $conf put a line in your settings.php like this:

$conf = array(...);
$original_conf = $conf;

By saving $conf in $original_conf, elysia_cron should consider your static variables and use them.

2. Install development release. With new elysia_cron version settings management is completely changed and the use of static $conf variables is fully supported. The dev release should be stable (i'm using it in a lot of production sites).
I'm not releasing it because a want to put some other features in...

Status: Fixed » Closed (fixed)

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

traviscarden’s picture

Version: 6.x-1.2 » 6.x-2.1

Update: I came back to this and tried it again on the 6.x-2.x branch, and this time it worked with the following code in my settings.php:

$conf = array(
  'ec_acquia_agent_cron_d' => 1,
  'ec_acquia_spi_cron_d' => 1,
  'ec_apachesolr_attachments_cron_d' => 1,
  'ec_ping_cron_d' => 1,
  'ec_xmlsitemap_engines_cron_d' => 1,
);