diff -Naurb rules/rules_scheduler/includes/rules_scheduler.handler.inc ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler.handler.inc
--- rules/rules_scheduler/includes/rules_scheduler.handler.inc	2016-01-15 18:28:46.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler.handler.inc	2017-12-26 13:33:55.406083562 +0100
@@ -47,6 +47,9 @@
     db_delete('rules_scheduler')
       ->condition('tid', $this->task['tid'])
       ->execute();
+    db_delete('rules_scheduler_params')
+      ->condition('tid', $this->task['tid'])
+      ->execute();
   }
 
   /**
diff -Naurb rules/rules_scheduler/includes/rules_scheduler.views.inc ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler.views.inc
--- rules/rules_scheduler/includes/rules_scheduler.views.inc	2016-01-15 18:28:46.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler.views.inc	2017-12-27 21:55:28.960138622 +0100
@@ -20,6 +20,7 @@
           'help' => t("Scheduled Rules components that are executed based on time and cron"),
           'weight' => -10,
         ),
+        'entity type' => 'rules_scheduler',
       ),
       'tid' => array(
         'title' => t('Tid'),
@@ -78,6 +79,157 @@
         ),
       ),
     ),
+    'rules_scheduler_params' => array(
+      'table' => array(
+        'group' => 'Rules scheduler',
+        'join' => array(
+          'rules_scheduler' => array(
+            'field' => 'tid',
+            'left_field' => 'tid'
+          ),
+        ),
+      ),
+      'name' => array(
+        'title' => t('Parameter name'),
+        'help' => t('The name of the parameter'),
+        'field' => array(
+          'click sortable' => TRUE,
+        ),
+        'filter' => array(
+          'handler' => 'views_handler_filter_string',
+        ),
+        'sort' => array(
+          'handler' => 'views_handler_filter_sort',
+        ),
+        'argument' => array(
+          'handler' => 'views_handler_argument',
+        ),
+      ),
+      'entity_type' => array(
+        'title' => t('Parameter type'),
+        'help' => t('The entity type of the parameter'),
+        'field' => array(
+          'click sortable' => TRUE,
+        ),
+        'filter' => array(
+          'handler' => 'views_handler_filter_string',
+        ),
+        'sort' => array(
+          'handler' => 'views_handler_filter_sort',
+        ),
+        'argument' => array(
+          'handler' => 'views_handler_argument',
+        ),
+      ),
+      'entity_id' => array(
+        'title' => t('Parameter entity id'),
+        'help' => t('The Entity ID of the parameter'),
+        'field' => array(
+          'click sortable' => TRUE,
+        ),
+        'filter' => array(
+          'handler' => 'views_handler_filter_numeric',
+        ),
+        'sort' => array(
+          'handler' => 'views_handler_filter_sort',
+        ),
+        'argument' => array(
+          'handler' => 'views_handler_argument_numeric',
+        ),
+      ),
+      'revision_id' => array(
+        'title' => t('Parameter revision id'),
+        'help' => t('The Revision ID of the parameter'),
+        'field' => array(
+          'click sortable' => TRUE,
+        ),
+        'filter' => array(
+          'handler' => 'views_handler_filter_numeric',
+        ),
+        'sort' => array(
+          'handler' => 'views_handler_filter_sort',
+        ),
+        'argument' => array(
+          'handler' => 'views_handler_argument_numeric',
+        ),
+      ),
+      'bundle' => array(
+        'title' => t('Parameter bundle'),
+        'help' => t('The bundle name of the parameter'),
+        'field' => array(
+          'click sortable' => TRUE,
+        ),
+        'filter' => array(
+          'handler' => 'views_handler_filter',
+        ),
+        'sort' => array(
+          'handler' => 'views_handler_filter_sort',
+        ),
+        'argument' => array(
+          'handler' => 'views_handler_argument',
+        ),
+      ),
+    ),
   );
   return $table;
 }
+
+function rules_scheduler_views_data_alter(&$data) {
+  $entity_info = entity_get_info();
+  foreach ($entity_info as $entity_type => $info) {
+    // Note to entity.
+    $data['rules_scheduler_params']['rules_scheduler_params_related_' . $entity_type] = array(
+      'group' => t('Rules Scheduler'),
+      'title' => t('Rules Scheduler to @entity',
+        array('@entity' => drupal_ucfirst($info['label']))),
+      'help' => t('The @entity entity that is associated with the Rules Scheduler.',
+        array('@entity' => $info['label'])),
+      'relationship' => array(
+        'handler' => 'views_handler_relationship',
+        'label' => t('@entity from Rules Scheduler',
+          array('@entity' => $entity_type)),
+        'base' => $info['base table'],
+        'base field' => $info['entity keys']['id'],
+        'relationship field' => 'entity_id',
+        'extra' => array(
+          array('table' => 'rules_scheduler_params', 'field' => 'entity_type', 'value' => $entity_type),
+        ),
+      ),
+    );
+  }
+
+  $components = rules_get_components();
+  // Walk through each parameter for each component, and add relationship and
+  // a field if the parameter is an entity.
+  foreach ($components as $component => $info) {
+    foreach ($info->parameterInfo() as $parameter_name => $parameter_info) {
+      if (isset($entity_info[$parameter_info['type']])) {
+        // Build a key that will be unique to this component and this parameter.
+        // Note that all components start with 'rules_' and thus are safe from
+        // conflicting with other entries in the data definitions in
+        // rules_scheduler_views_data_info().
+        $data_key = $component . '__' . $parameter_name;
+        $data[$entity_info[$parameter_info['type']]['base table']][$data_key] = array(
+          'group' => t('Rules Scheduler'),
+          'title' => t('Rules parameter for @rule_param',
+            array('@rule_param' => $data_key)),
+          'help' => t('The @entity entity that is associated with the Rules Scheduler.',
+            array('@entity' => $info->label)),
+          'relationship' => array(
+            'relationship field' => $entity_info[$parameter_info['type']]['entity keys']['id'],
+            'handler' => 'rules_scheduler_views_relation',
+            'parameter' => $parameter_name,
+            'parameter type' => $parameter_info['type'],
+            'base' => 'rules_scheduler',
+            'base field' => 'tid',
+            'label' => t('@parameter_label', array('@parameter_label' => $parameter_info['label'])),
+            'group' => t('Rules parameter'),
+            'title' => t('@parameter (@entity) in @component', array('@parameter' => $parameter_info['label'], '@entity' => $parameter_info['type'], '@component' => $info->label)),
+            'help' => t('A bridge to the parameter %parameter (%entity) in the Rules component %component.', array('%parameter' => $parameter_info['label'], '%entity' => $parameter_info['type'], '%component' => $component)),
+          ),
+        );
+      }
+    }
+  }
+}
+
diff -Naurb rules/rules_scheduler/includes/rules_scheduler_views_relation.inc ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler_views_relation.inc
--- rules/rules_scheduler/includes/rules_scheduler_views_relation.inc	1970-01-01 01:00:00.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/includes/rules_scheduler_views_relation.inc	2017-12-26 23:04:40.823996665 +0100
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * An extended subclass for parameter relationships.
+ */
+class rules_scheduler_views_relation extends views_handler_relationship {
+  /**
+   * Override of the normal query implementation.
+   */
+  function query() {
+    $this->ensure_my_table();
+    $views_data = views_fetch_data($this->table);
+    $left_field = $views_data['table']['base']['field'];
+    $first = array(
+      'left_table' => $this->table_alias,
+      'left_field' => $left_field,
+      'table' => 'rules_scheduler_params',
+      'field' => 'entity_id',
+      'extra' => array(
+        array('table' => 'rules_scheduler_params', 'field' => 'entity_type', 'value' => $this->definition['parameter type']),
+      ),
+    );
+    $first_join = new views_join();
+    $first_join->definition = $first;
+    $first_join->construct();
+    $first_join->adjusted = TRUE;
+    $this->first_alias = $this->query->add_table('rules_scheduler_params', $this->relationship, $first_join);
+
+    $second_join = new views_join();
+    $second_join->definition = array(
+      'left_table' => 'rules_scheduler_params',
+      'left_field' => 'tid',
+      'table' => 'rules_scheduler',
+      'field' => 'tid',
+    );
+    $second_join->construct();
+    $second_join->adjusted = TRUE;
+    $alias = 'rules_scheduler_params_' . $this->table;
+    $this->alias = $this->query->add_relationship($alias, $second_join, $this->definition['base'], $this->relationship);
+  }
+}
diff -Naurb rules/rules_scheduler/rules_scheduler.info ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.info
--- rules/rules_scheduler/rules_scheduler.info	2017-04-20 16:19:18.000000000 +0200
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.info	2017-12-26 10:56:13.501169810 +0100
@@ -12,6 +12,7 @@
 files[] = includes/rules_scheduler.views_default.inc
 files[] = includes/rules_scheduler.views.inc
 files[] = includes/rules_scheduler_views_filter.inc
+files[] = includes/rules_scheduler_views_relation.inc
 
 ; Information added by Drupal.org packaging script on 2017-04-20
 version = "7.x-2.10"
diff -Naurb rules/rules_scheduler/rules_scheduler.install ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.install
--- rules/rules_scheduler/rules_scheduler.install	2016-01-15 18:28:46.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.install	2017-12-15 22:48:46.233941734 +0100
@@ -58,6 +58,53 @@
       'id' => array('config', 'identifier'),
     ),
   );
+  $schema['rules_scheduler_params'] = array(
+    'description' => 'Stores scheduled task parameters.',
+    'fields' => array(
+      'tid' => array(
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => "The scheduled task's id.",
+      ),
+      'name' => array(
+        'type' => 'varchar',
+        'length' => '64',
+        'not null' => TRUE,
+        'description' => 'The name of the parameter.',
+      ),
+      'entity_type' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => FALSE,
+        'default' => ''
+      ),
+      'entity_id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => FALSE,
+        'description' => 'The entity id of this parameter.',
+      ),
+      'revision_id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => FALSE,
+        'description' => 'The entity revision id this data is attached to, or NULL if the entity type is not versioned',
+      ),
+      'bundle' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => FALSE,
+        'default' => '',
+        'description' => 'The bundle of the parameter.'
+      ),
+    ),
+    'primary key' => array('tid', 'name'),
+    'indexes' => array(
+      'tid' => array('tid'),
+      'entity_id' => array('entity_id'),
+    ),
+  );
   return $schema;
 }
 
@@ -154,6 +201,93 @@
   }
 }
 
+/**
+ * Create a table to store scheduled task parameter entity information.
+ */
+function rules_scheduler_update_7205() {
+  $table = array(
+    'description' => 'Stores scheduled task parameters.',
+    'fields' => array(
+      'tid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => "The scheduled task's id.",
+      ),
+      'name' => array(
+        'type' => 'varchar',
+        'length' => '64',
+        'not null' => TRUE,
+        'description' => 'The name of the parameter.',
+      ),
+      'entity_type' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => FALSE,
+        'default' => '',
+        'description' => 'The type of the parameter.'
+      ),
+      'entity_id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => FALSE,
+        'description' => 'The entity id of this parameter.',
+      ),
+      'revision_id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => FALSE,
+        'description' => 'The entity revision id this parameter, or NULL if the entity type is not versioned',
+      ),
+      'bundle' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => FALSE,
+        'default' => '',
+        'description' => 'The bundle of the parameter.'
+      ),
+    ),
+    'primary key' => array('tid', 'name'),
+    'indexes' => array(
+      'tid' => array('tid'),
+      'entity_id' => array('entity_id'),
+    ),
+  );
+  if (!db_table_exists('rules_scheduler_params')) {
+    db_create_table('rules_scheduler_params', $table);
+
+    // Find existing scheduled tasks and record their parameters.
+    // !TODO This should perhaps be moved to a cron hook for sites with a very large number of tasks.
+    $result = db_select('rules_scheduler', 'r', array('fetch' => PDO::FETCH_ASSOC))
+      ->fields('r')
+      ->execute();
+    foreach ($result as $task) {
+      // Delete
+      $data = unserialize($task['data']);
+      // Save any referenced entities.
+      foreach ($data->variables as $name => $variable) {
+        if ($variable instanceof EntityValueWrapper) {
+          $variable = $variable->info()['parent'];
+        }
+        if ($variable instanceof EntityDrupalWrapper) { // !TODO Is this the right way to determine if the param is an entity?
+          list($id, $vid, $bundle) = entity_extract_ids($variable->type(), $variable->value());
+          $record = array(
+            'tid' => $task['tid'],
+            'name' => $name,
+            'entity_type' => $variable->type(),
+            'entity_id' => $id,
+            'revision_id' => $vid,
+            'bundle' => $bundle,
+          );
+          db_insert('rules_scheduler_params')
+            ->fields($record)
+            ->execute();
+        }
+      }
+    }
+  }
+}
+
 /**
  * Rules upgrade callback for mapping the action name.
  */
diff -Naurb rules/rules_scheduler/rules_scheduler.module ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.module
--- rules/rules_scheduler/rules_scheduler.module	2016-01-15 18:28:46.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.module	2017-12-27 21:57:58.120178681 +0100
@@ -132,6 +132,9 @@
   db_delete('rules_scheduler')
     ->condition('tid', $tid)
     ->execute();
+  db_delete('rules_scheduler_params')
+    ->condition('tid', $tid)
+    ->execute();
 }
 
 /**
@@ -155,12 +158,39 @@
   }
   if (!empty($task['identifier'])) {
     // If there is a task with the same identifier and component, we replace it.
-    db_delete('rules_scheduler')
-      ->condition('config', $task['config'])
-      ->condition('identifier', $task['identifier'])
-      ->execute();
+    $tid = db_query('SELECT tid from {rules_scheduler} WHERE config = :config AND identifier = :id',
+      array(':config' => $task['config'], ':id' => $task['identifier']))
+      ->fetchField();
+    if ($tid) {
+      rules_scheduler_task_delete($tid);
+    }
   }
   drupal_write_record('rules_scheduler', $task);
+
+  // Delete any stored parameter information for this task.
+  db_delete('rules_scheduler_params')
+    ->condition('tid', $task['tid'])
+    ->execute();
+  // Save any referenced entities.
+  foreach ($task['data']->variables as $name => $variable) {
+    if ($variable instanceof EntityValueWrapper) {
+      $variable = $variable->info()['parent'];
+    }
+    if ($variable instanceof EntityDrupalWrapper) { // !TODO Is this the right way to determine if the param is an entity?
+      list($id, $vid, $bundle) = entity_extract_ids($variable->type(), $variable->value());
+      $record = array(
+        'tid' => $task['tid'],
+        'name' => $name,
+        'entity_type' => $variable->type(),
+        'entity_id' => $id,
+        'revision_id' => $vid,
+        'bundle' => $bundle,
+      );
+      db_insert('rules_scheduler_params')
+        ->fields($record)
+        ->execute();
+    }
+  }
 }
 
 /**
@@ -197,6 +227,12 @@
   // Only react on real delete, not revert.
   if (!$rules_config->hasStatus(ENTITY_IN_CODE)) {
     // Delete all tasks scheduled for this config.
+    $subquery = db_select('rules_scheduler', 'rs')
+      ->condition('rs.config', $rules_config->name)
+      ->addField('rs', 'tid');
+    db_delete('rules_scheduler_params')
+      ->condition('tid', $subquery, 'IN')
+      ->execute();
     db_delete('rules_scheduler')
       ->condition('config', $rules_config->name)
       ->execute();
@@ -212,3 +248,52 @@
     'path' => drupal_get_path('module', 'rules_scheduler') .'/includes',
   );
 }
+
+/**
+ * Implementation of hook_entity_info().
+ */
+
+function rules_scheduler_entity_info() {
+  return array(
+    'rules_scheduler' => array(
+      'label' => t('Rules Scheduler Task'),
+      'base table' => 'rules_scheduler',
+      'load hook' => 'rules_scheduler_task_load',
+      'entity class' => 'Entity',
+      'controller class' => 'EntityAPIController',
+      'entity keys' => array(
+        'id' => 'tid',
+        'label' => 'identifier',
+        ),
+      'module' => 'rules_scheduler',
+      'static cache' => TRUE,
+//      'bundles' => array(),
+      'access callback' => 'rules_scheduler_task_access',
+    )
+  );
+}
+
+/**
+ * Implementation of hook_action_info().
+ */
+function rules_scheduler_action_info() {
+  return array(
+    'rules_scheduler_delete_action' => array(
+      'label' => t('Delete Rules Scheduler Task'),
+      'description' => t('Delete Rules Scheduler Task'),
+      'type' => 'rules_scheduler',
+      'configurable' => FALSE,
+      'triggers' => array(
+        'any',
+      ),
+    ),
+  );
+}
+
+function rules_scheduler_task_access() {
+  return TRUE;
+}
+
+function rules_scheduler_delete_action(&$object, $context = array()){
+  rules_scheduler_task_delete($object->tid);
+}
\ Pas de fin de ligne à la fin du fichier
diff -Naurb rules/rules_scheduler/rules_scheduler.rules.inc ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.rules.inc
--- rules/rules_scheduler/rules_scheduler.rules.inc	2016-01-15 18:28:46.000000000 +0100
+++ ../../../gotos3_dev/modules/rules/rules_scheduler/rules_scheduler.rules.inc	2017-12-22 21:10:54.891274340 +0100
@@ -181,6 +181,17 @@
  * Action: Delete scheduled tasks.
  */
 function rules_scheduler_action_delete($component_name = NULL, $task_identifier = NULL) {
+  $subquery = db_select('rules_scheduler', 'rs');
+  if (!empty($component_name)) {
+    $subquery->condition('rs.config', $component_name);
+  }
+  if (!empty($task_identifier)) {
+    $subquery->condition('rs.identifier', $task_identifier);
+  }
+  $subquery->addField('rs', 'tid');
+  db_delete('rules_scheduler_params')
+    ->condition('tid', $subquery, 'IN')
+    ->execute();
   $query = db_delete('rules_scheduler');
   if (!empty($component_name)) {
     $query->condition('config', $component_name);
