How to set an expiration date on an active rule so that it is disabled on a certain date? Anyone knows how to set an expiration date on a Drupal 7 Rule (using the Rules module) so that the rule is disabled on a certain date?

Example Use Case:

We've created a product (using Drupal Commerce) with a name that's just a long string of random upper and lowercase characters and numbers. We then created a rule with one condition and two actions so that when Drupal is initialized (the event) it recognizes a specific URL a user came to the site with (ie. sitename/?SKU=productnamewithlotsofcharacters)[using the text comparison condition and then the provide URL argument value action] and when that's the case it re-directs the user to a specific product form (page redirect action to a drupal commerce express checkout form). 

We only want this promo to last until a certain date, but we will be using it again in the future (so we just want the rules disabled). When the user uses this link to get to our site and the promo is 'expired' it takes them to a page that says 'Promo Expired'. 

It's not the most fool-proof method of doing things of course but it works well enough for our needs.
Programmatically disable a rule contains an example of how you can disable a rule programatically, as in this example:

/**
* Implements hook_update_N().
* Disables name_of_rule rule.
*/
function hook_update_N() {
  $rules_config = rules_config_load('name_of_rule');
  $rules_config-&gt;active = FALSE;
  $rules_config-&gt;save();
}


Tune this example to fit the machine name of your rule to be disabled, and then use that as the "PHP code " in a Rules Component (Action) which only performs an "Execute custom PHP code".

With that, the only challenge left to make this work, is to enhance your rule to be disabled, to conditionally trigger this (new) Rules Component "after the moment has arrived" for your rule to be disabled. For this you might want to add "Conditional Rules" (so that you can add a condition within the Rules Action of your rule to be disabled).