docs: def _ScheduleGenericHunt(hunt_obj):
    """Adds foreman rules for a generic hunt."""
    # TODO: Migrate foreman conditions to use relation expiration
    # durations instead of absolute timestamps.
    foreman_condition = foreman_rules.ForemanCondition(
        creation_time=rdfvalue.RDFDatetime.Now(),
        expiration_time=hunt_obj.init_start_time + hunt_obj.duration,
        description="Hunt %s %s" % (hunt_obj.hunt_id, hunt_obj.args.hunt_type),
        client_rule_set=hunt_obj.client_rule_set,
        hunt_id=hunt_obj.hunt_id)
  
    # Make sure the rule makes sense.
    foreman_condition.Validate()
  
    data_store.REL_DB.WriteForemanRule(foreman_condition)