I noticed validation isn't catching when enabling an incorrect cron task via Drush. The example below is a recent mistake using "system" instead of the correct "system_cron" cron task id. I think this can be worked around for cleanliness.

$ drush cron-enable system
Drush command terminated abnormally due to an unrecoverable error.       [error]
Error: Call to a member function enable() on a non-object in
/drupal/sites/all/modules/contrib/ultimate_cron/ultimate_cron.drush.inc,
line 457

Fatal error: Call to a member function enable() on a non-object in /drupal/code/sites/all/modules/contrib/ultimate_cron/ultimate_cron.drush.inc on line 457

Comments

Chris Charlton created an issue. See original summary.

Chris Charlton’s picture

Patch provided.

Chris Charlton’s picture

Status: Active » Needs review

arnested’s picture

Status: Needs review » Fixed

Thank you for catching this and thank you for the patch.

I have applied the patch to the 7.x-2.x branch and the fix will be part of the next release.

Chris Charlton’s picture

Ugh, I just realized both 'disable' and 'unlock' need the same treatment. Shall I do that patch, and if so in a new issue or this one?

arnested’s picture

It's OK to post it here :-)

Status: Fixed » Closed (fixed)

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